]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Correct mod_autoindex's test of the query string's requested ordering.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 17 Nov 2001 03:27:09 +0000 (03:27 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 17 Nov 2001 03:27:09 +0000 (03:27 +0000)
  This patch is a bit more paranoid than Kestutis's, but this is user
  supplied input, so a bit of paranoia is healthy.

PR: 8771
Submitted by: Kestutis Kupciunas <kesha@soften.ktu.lt>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@92017 13f79535-47bb-0310-9956-ffa450edef68

src/modules/standard/mod_autoindex.c

index 0201d5cf5435d6891d4fa61d56d679243c4986d4..607b5280f02ea88412ef9ede06ae1f0425eab1c4 100644 (file)
@@ -1673,8 +1673,8 @@ static int index_directory(request_rec *r,
     else {
        keyid = *qstring;
        ap_getword(r->pool, &qstring, '=');
-       if (qstring != '\0') {
-           direction = *qstring;
+       if (*qstring == D_DESCENDING) {
+           direction = D_DESCENDING;
        }
        else {
            direction = D_ASCENDING;