]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fix trailing slash normalisation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Feb 2020 17:05:27 +0000 (17:05 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Feb 2020 17:05:27 +0000 (17:05 +0000)
src/libserver/http/http_util.c

index 89e74a94b79355c533cb0a9afda3f611a5466c94..f9e5b3e7764ff26c2bb57b83efb68b1839ef4507 100644 (file)
@@ -497,6 +497,17 @@ rspamd_http_normalize_path_inplace (gchar *path, guint len, guint *nlen)
                        }
                }
                break;
+       case st_got_dot:
+               if (slash) {
+                       /* /. -> must be / */
+                       *o++ = '/';
+               }
+               else {
+                       if (o > path) {
+                               *o++ = '.';
+                       }
+               }
+               break;
        case st_got_slash:
                *o++ = '/';
                break;