security.text

来自「这是国外的resip协议栈」· TEXT 代码 · 共 28 行

TEXT
28
字号
when user logs in, get username and passwordcreate password string (username:realm:password), md5, and check against dbthen they are authenticatedcreate a cookie called "authentication" with        sha1 (username + salt)       expiration of now() + 15 minon each secure page,   verify that the user and authentication cookies are set   compare the value of the cookie to sha1 (username+salt)   if not set or not valid      (initial page only) -- if there are post values for user name      	    and password, try to log in       (non initial page, or login fails)       	    redirect to login page with error message    else	reset expiration on cookie to now()+15 min** what about making the salt a global variable to avoid having to hit the DBeach page?  In that design, how do you reset the value?  Does it require a stop& restart of web server?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?