发布用户名和受保护文件夹/站点的密码
我正在尝试发布用户名&从 HTML 表单到网站上受保护文件夹的密码?这可能吗?我以为我只是在 URL 中传递如下语法,但没有成功
我仍然收到弹出警报,要求输入用户名和密码?我需要能够自动登录该人。
希望有人可以提供帮助吗?谢谢
I'm trying to post a username & password from an HTML form to a protected folder on a website? Is this possible? I thought I just pass in a syntax in the URL like the below but not having any success
http://username:[email protected]
I'm still getting the alert pop up asking for the username and password? I need to be able to auto log the person in..
Hope someone can help? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您通过 HTML 表单登录,那么这将不起作用。这仅适用于 HTTP 身份验证,这是完全不同的事情。
我认为没有很多(任何?)浏览器支持打开来发布数据。这让你希望该网站接受基于 GET 的登录(如果这样做,他们应该被枪杀。)。
If you login via a HTML form, then this won't work. This is only for HTTP authentication, which is something else completely different.
I don't think many (any?) browsers support being opened to post data. Which leaves you hoping that the site accepts GET based logins (and they should be shot if they do.).
URL 的地址部分由 Web 服务器解析,因此处理 HTML 表单的代码永远看不到它。
如果要将参数传递给表单,则必须使用
url?field=value&field2=value2
。这仅适用于使用GET
操作的表单。对于POST
,您需要一个程序来生成编码文档并上传该文档。在这两种情况下,您的用户名和密码都会以纯文本形式在互联网上广播,因此该帐户将在几个小时内被黑客入侵。更清楚地说:没有办法以这种方式“保护”此文件夹中的数据。这就像在你的房子里添加一扇有四把锁的门,并将钥匙钉在门旁边街道上的柱子上。
The address part of the URL is parsed by your web server, so the code which handles the HTML form never sees it.
If you want to pass parameters to a form, you must use
url?field=value&field2=value2
. This only works with forms that use theGET
action. ForPOST
, you need a program to generate an encoded document and upload that.In both cases, your user name and password are broadcasted as plain text on the Internet, so the account will be hacked within a few hours. To put it more clearly: There is no way to "protect" the data in this folder this way. This is like adding a door with four locks to your house and keep the keys on a nail in a post on the street next to the door.
我完全按照我在问题中所做的操作,它适用于除 Mac 上的 Safari 之外的所有浏览器
I did exactly what I did in the question and it works on all browser except Safari on a Mac