fix busybox http auth if the root user has an empty password
SVN-Revision: 12869
This commit is contained in:
		| @@ -3,7 +3,7 @@ | |||||||
|  |  | ||||||
| --- a/networking/httpd.c | --- a/networking/httpd.c | ||||||
| +++ b/networking/httpd.c | +++ b/networking/httpd.c | ||||||
| @@ -1697,21 +1697,32 @@ | @@ -1697,21 +1697,32 @@ static int check_user_passwd(const char  | ||||||
|   |   | ||||||
|  		if (ENABLE_FEATURE_HTTPD_AUTH_MD5) { |  		if (ENABLE_FEATURE_HTTPD_AUTH_MD5) { | ||||||
|  			char *md5_passwd; |  			char *md5_passwd; | ||||||
| @@ -17,7 +17,7 @@ | |||||||
| + | + | ||||||
| +				pwd = getpwnam(&md5_passwd[4]); | +				pwd = getpwnam(&md5_passwd[4]); | ||||||
| +				if(!pwd->pw_passwd || !pwd->pw_passwd[0] || pwd->pw_passwd[0] == '!') | +				if(!pwd->pw_passwd || !pwd->pw_passwd[0] || pwd->pw_passwd[0] == '!') | ||||||
| +					continue; | +					return 1; | ||||||
| + | + | ||||||
| +				md5_passwd = pwd->pw_passwd; | +				md5_passwd = pwd->pw_passwd; | ||||||
| +				goto check_md5_pw; | +				goto check_md5_pw; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Felix Fietkau
					Felix Fietkau