]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Another fix to path normalisation
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Apr 2018 11:53:10 +0000 (12:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Apr 2018 11:53:10 +0000 (12:53 +0100)
src/libutil/http.c

index ade3160cd1017a2d886e8fc78a846bcf449c7b77..a5133695ba311a8ce21be7532cf7cba3d54ed1a8 100644 (file)
@@ -3780,9 +3780,12 @@ rspamd_http_normalize_path_inplace (gchar *path, guint len, guint *nlen)
                                if (((o > path && *(o - 1) != '/') || (o == path)) && slash) {
                                        /* Preserve one slash */
                                        *o++ = '/';
+                                       slash = p;
+                               }
+                               else {
+                                       slash = NULL;
                                }
 
-                               slash = p;
                                dot = NULL;
                                /* Ignore last slash */
                                state = st_normal;