File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 5959
6060/**
6161 * Double check if a password has been configured. If there has not and we are
62- * testing the server, exit with HTTP code 401. Otherwise treat it as an empty
63- * string.
62+ * testing the server, exit with HTTP code 401.
6463 */
65- if (!isset ($ Password ) || !is_string ($ Password )) {
64+ if (
65+ $ testing &&
66+ (
67+ !isset ($ Password ) ||
68+ !is_string ($ Password )
69+ )
70+ ) {
6671 if ($ testing ) {
6772 header ($ protocol . ' 401 Unauthorized ' );
6873 exit ();
6974 }
70- $ Password = '' ;
7175}
7276
7377/**
7478 * If the client did not submit a password, or the submitted password did not
7579 * match this server's password, exit with HTTP code 403.
7680 */
7781if (
82+ !isset ($ Password ) ||
7883 !isset ($ _POST ['password ' ]) ||
7984 $ _POST ['password ' ] !== hash ('sha512 ' , $ Password )
8085) {
You can’t perform that action at this time.
0 commit comments