HTTP BASIC 身份验证用户名是否有最大长度?
通过 HTTP BASIC 身份验证发送到 Web 应用程序的用户名或密码是否有最大长度?我浏览了 RFC2617,找不到任何明显的东西,但很好奇并想确定一下。
(这一切都是通过 SSL 完成的,所以不用担心安全问题。)
Is there a maximum length for a username or password which is sent to a web application through HTTP BASIC authentication? I looked through RFC2617 and couldn't find anything obvious, but was curious and wanted to make sure.
(This is all being done over SSL, so don't worry about security for my sake.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对身份验证令牌没有强制执行的规范限制。但是,您通常可能会遇到 HTTP 标头的实际服务器特定限制,如此问题中概述。
There's no spec-enforced limit on the auth token. However you may run into practical server-specific limits on HTTP headers in general, as outlined in this question.
根据 http://httpd.apache.org/docs/2.4/programs /htpasswd.html#restrictions 用户名限制为 255 个字符(并且用户名不得包含 : )。
在 Windows 上,密码还有 255 个字符的限制 - 如果密码较长,则会被截断。
According to http://httpd.apache.org/docs/2.4/programs/htpasswd.html#restrictions there is a limit of 255 characters for the username (and the username may not contain : ).
On Windows there is additionally a limit of 255 characters for the password - if the password is longer it will be truncated.