admin-ajax.php如何工作?
-
-
`ajax-admin.php`句柄.. ajax请求.请清除您的标题和一般的问题,http://wordpress.stackexchange.com/faq`ajax-admin.php` handles.. ajax requests. Please clear your title up and the question in general, http://wordpress.stackexchange.com/faq
- 0
- 2012-12-27
- Wyck
-
4 个回答
- 投票数
-
- 2012-12-27
admin-ajax.php
是 WordPress AJAX API 的一部分,是的,它确实处理来自后端和前端的请求.尽量不要担心它在wp-admin
中的事实.我认为这也是一个奇怪的地方,但它本身并不是安全问题.我不知道这与"枚举管理员"有什么关系.admin-ajax.php
is part of the WordPress AJAX API, and yes, it does handle requests from both backend and front. Try not to worry about the fact that it is inwp-admin
. I think that is a strange place for it too, but it is not a security problem in itself. How this relates to "enumerate the admins", I don't know.-
您是否建议将wp管理员页面从外部访问?而且您知道这样做是否会干扰Ajax管理员的工作?would you recommend moving the wp admin page from being externally available? and do you know if doing so would disrupt anything with the ajax admin?
- 0
- 2012-12-27
- nick
-
我不是100%知道这意味着什么,但是如果您要求通过VPN的IP访问`wp-admin'中的文件,则可以,这会搞砸AJAX.AJAX调用来自用户的浏览器,因此来自用户的IP.I am not 100% sure what this means but if you require that access to files in `wp-admin` be from your VPN's IP, then yes that should mess up AJAX. AJAX calls are from the user's browser so come from the user's IP.
- 0
- 2012-12-27
- s_ha_dum
-
您能否解释一下,为什么对我们n00bs来说这不是安全问题?否则,回答得体.Can you explain why, specifically, it is not a security problem for us n00bs? Otherwise, decent answer.
- 1
- 2015-04-28
- daaxix
-
- 2017-06-15
对于未经身份验证和不受信任的用户,您需要对VPN/防火墙/Apache
.htaccess
设置两个特定的例外,即:-
example.com/wp-admin/admin-post.php
-
example.com/wp-admin/admin-ajax.php
这些是内部WP以及各种插件所使用的两个自动魔术终结点.
以下是
admin-post.php
的功能的一些解释:admin-ajax.php
的工作方式非常相似,有用的解释是此处.For unauthenticated and untrusted users, you'll want to make two specific exceptions to your VPN / Firewall / Apache
.htaccess
, which are:example.com/wp-admin/admin-post.php
example.com/wp-admin/admin-ajax.php
These are two auto-magic endpoints used by a lot by both internal WP and also various plugins.
Here's some explanation of what
admin-post.php
does:admin-ajax.php
works in a very similar way, and a helpful explanation is here. -
- 2012-12-27
如果您想限制对WP后端的访问(例如:
wp-admin
),只需在wp-admin <上使用
目录..htaccess
规则请查看本文以了解总体概述:使用.htaccess密码保护目录
也请针对您的特定情况查看此主题:密码保护/wp-admin/
If you want to limit access to the WP backend (ex:
wp-admin
), just use a.htaccess
rule on thewp-admin
directory.Check out this article for a general overview: Password Protect a Directory Using .htaccess
Also check out this topic for your specific case: Password protecting /wp-admin/
-
或者,如果您愿意通过IP进行操作:http://betterwp.net/wordpress-tips/protect-wordpress-wp-admin-folder/Or if you'd rather do it by IP : http://betterwp.net/wordpress-tips/protect-wordpress-wp-admin-folder/
- 1
- 2012-12-27
- skim-
-
- 2014-01-17
我个人认为这是一个可怕的主意.大约两个月前,我们的开发总监坚持我们这样做,这与开发团队的建议背道而驰.对于我们来说,这是一场真正的噩梦和令人难以置信的痛苦,不仅会杀死ajax,还会给我们带来许多管理问题.
我们有40名正式员工和4位开发人员试图偶尔使用vpn,而且口吃不全,而且所有用户现在都需要两套密码,一套用于wp,一套用于vpn,而不仅仅是个人使用的共享密码.是的,我的意思是您还将如何进行安全审核.记住一个安全密码就足够了,更不用说两个了.
增加了一个问题,很多人不知道如何使用vpn,通常这只会引起更多问题.
最终,这是一个糟糕的主意,通常由不了解或不了解WordPress的管理人员或更高级别的人提出.他们从可怕的角度看待它,因为它是开源的,所以它也必须是一个安全问题,里面充斥着容易被窃听的漏洞等等.
WordPress是安全的,将wp-admin留在vpn后面不仅使人恐惧,它给团队中的每个成员带来了噩梦
为什么对WordPress而言管理类型不信任,他们似乎忘记了主要站点使用WordPress而不使用vpn,例如以mashable为例.
所以回顾一下:
Ajax无法在vpn后面运行.
出于上述原因,vpn是一个可怕的想法
WordPress是安全的,如果您保持它和插件为最新状态,它将保持不变.
听您的开发人员,您将为其专业知识付费.我可以向您保证,没有任何事情会破坏工作关系,例如不将您的信任放在个人身上,而必须检查他们的知识.
如果您确实要使用vpn,请确保购买足够的用户许可证.
My personal opinion is that this is a god awful idea. About two months ago our director of development insisted we do just this, much against the advice of the Dev team. It's a genuine nightmare and an incredible pain for us, not only does it kill ajax all together it presents so many administration issues for us.
We have 40 regular staff and 4 devs trying to use the vpn at times and it just stutters, along with that all users now require two sets of passwords one for wp and one for vpn and that's not just a shared password it's individual ones, I mean how else would you do a security audit. It's hard enough to remember one secure password, let alone two.
Add to the issue that a lot of people do not know how to use a vpn and often that just causes more issues.
Ultimately it's a terrible idea and it's often put forward by management or higher who do not know or understand WordPress. They see it in a terrible light, that because it's open source it must also be a security issue, filled with easily tapped exploits and so on.... its getting old.
WordPress is secure and sticking wp-admin behind a vpn is not only fear mongering it presents a nightmare for every member of the team
Why is it that management types have no trust when it comes to WordPress, they seem to forget major sites use WordPress and don't use vpns, look at mashable for example.
So to recap:
Ajax won't work behind a vpn.
Vpn is a terrible idea for reasons mentioned above
WordPress is secure and will remain so if you keep it and plugins up to date.
Listen to your Dev, you pay them for their expertise. I can promise you, that nothing undermines a working relationship like not putting your trust into an individual and having to check up on their knowledge.
If you do go with vpn, be sure to buy enough user licenses.
-
我没有足够的分数来否决你,但如果我愿意,我会的.您对信任您的开发人员一无所知,但您无话可说1)*它做什么*或2)*为什么在wp-admin中可以.*我对这个答案没有印象.I don't have enough points to downvote you yet, but I would if I did. You go on a rant about trusting your developers, but nowhere do you say 1) *what it does,* or 2) *why it is ok in wp-admin.* I'm not impressed with this answer.
- 12
- 2015-04-28
- daaxix
-
取决于插件的开发方式,可以使用admin-ajax.php利用脆弱的插件.许多插件没有进行静态或动态代码分析来进行漏洞测试.WordPress核心也在不断修复漏洞.如果您遵循WordPress安全准则,其中包括诸如限制wp-admin,保持所有最新信息以及限制您安装的插件之类的强化措施,那么暴露的机会就更大了.但是,您不是100%安全的.Vulnerable plugins can be exploited with admin-ajax.php depending on how the plugin is developed. Many plugins do not undergo static or dynamic code analysis for vulnerability testing. WordPress core is also constantly fixing vulnerabilities. If you follow WordPress security guidelines, which include hardening like restricting wp-admin, keeping everything up-to-date, and limiting the plugins you install, your exposure is more limited. You are not, however, 100% secure.
- 1
- 2019-08-26
- tacotuesday
-
WP在安全性方面有着可怕的踪迹.主要是由于不良的插件,而且也是核心问题.而且由于其受欢迎程度,有许多机器人只扫描WWW并尽可能多地入侵wp网站.还有其他开源项目在安全性方面做得更好.我喜欢wordpress,它很容易设置,并且对博客和小型网站来说非常合适.但是,将其用于存储诸如信用卡之类的敏感数据的在线商店之类的东西确实不是一个好主意.简单地阻止对/wp-admin的访问可能不是一个好主意,但是您绝对应该担心安全性.Well WP has a horrible track concerning security. Mostly due to bad plugins, but also in the core. And due to its popularity, there are lots of bots that just scan the WWW and hack as many wp sites as they can. There are other open source projects that do a way better job at security. I like wordpress, it's easy to setup and I think its perfectly fine for blogs and small sites. But using it for stuff like online shops that store sensible data like credit cards is really a bad idea. Simply blocking access to /wp-admin might not be a good idea, but you should definitely worry about security.
- 0
- 2020-03-26
- Gellweiler
我们与外部开发人员遇到了一些问题.
我们希望将对
wp-admin
网站的访问限制为仅内部访问(通过 VPN ).简单地说,它将不会受到外部用户的攻击.我们可以从网站枚举管理员,而不希望他们被网络钓鱼.我们的开发人员说我们不能这样做,因为该站点需要使管理页面可以从外部访问,以便该页面正常运行.尤其是
admin-ajax
页面.admin-ajax.php
页面有什么作用?它位于WordPress的管理部分.最终用户是否未经身份验证访问了它?将其提供给外部用户是不安全的做法吗?