]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/generators/mod_autoindex.c (add_header): Reject invalid
authorJoe Orton <jorton@apache.org>
Fri, 5 Jun 2026 09:45:07 +0000 (09:45 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 5 Jun 2026 09:45:07 +0000 (09:45 +0000)
  NameWidth values less than 5, including zero.

Submitted by: metsw24-max <metsw24 gmail.com>
GitHub: closes #617

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935002 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_autoindex.c

index 2230338ea96021606f8c13e3503729c9b5f9ecb4..602b2e51ce2c3f1e98d5e3301d1fd5d1d0ad017a 100644 (file)
@@ -462,8 +462,8 @@ static const char *add_opts(cmd_parms *cmd, void *d, int argc, char *const argv[
             else {
                 int width = atoi(&w[10]);
 
-                if (width && (width < 5)) {
-                    return "NameWidth value must be greater than 5";
+                if (width < 5) {
+                    return "NameWidth value must be at least 5";
                 }
                 d_cfg->name_width = width;
                 d_cfg->name_adjust = K_NOADJUST;