Is there a maximum length for a HTTP BASIC authentication username?

故事扮演 提交于 2019-11-30 01:25:47

问题


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.)


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4027825/is-there-a-maximum-length-for-a-http-basic-authentication-username

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!