From: Vsevolod Stakhov Date: Tue, 17 Apr 2018 11:53:10 +0000 (+0100) Subject: [Minor] Another fix to path normalisation X-Git-Tag: 1.7.4~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68a41d5fcfbe71682696c5118732e9453cea7361;p=thirdparty%2Frspamd.git [Minor] Another fix to path normalisation --- diff --git a/src/libutil/http.c b/src/libutil/http.c index ade3160cd1..a5133695ba 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -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;