You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/06/19 12:48:30 UTC

DO NOT REPLY [Bug 9989] New: - patch: htpasswd bug ("-n and -c conflicts" although I didn't give -n)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9989>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9989

patch: htpasswd bug ("-n and -c conflicts" although I didn't give -n) 

           Summary: patch: htpasswd bug ("-n and -c conflicts" although I
                    didn't give -n)
           Product: Apache httpd-2.0
           Version: 2.0.39
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: support
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: ch@lathspell.de


Stupid mistake, "1 & (1 | 2) == 1 & (3) == 1" where as it must be 3 to fullfill
the condition. 1 sadly is enough to fullfill the if() condition.. 

--- support/htpasswd.c.orig     Wed Jun 19 12:41:26 2002
+++ support/htpasswd.c  Wed Jun 19 12:40:55 2002
@@ -375,7 +375,7 @@
         }
     }

-    if (*mask & (APHTP_NEWFILE | APHTP_NOFILE)) {
+    if ((*mask & (APHTP_NEWFILE | APHTP_NOFILE)) == (APHTP_NEWFILE |
APHTP_NOFILE)) {
         apr_file_printf(errfile, "%s: -c and -n options conflict\n", argv[0]);
         exit(ERR_SYNTAX);
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org