Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
squidGuard.5169
squidGuard-trailing_dot.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File squidGuard-trailing_dot.patch of Package squidGuard.5169
Index: src/sgDiv.c =================================================================== --- src/sgDiv.c.orig +++ src/sgDiv.c @@ -94,6 +94,7 @@ int parseLine(line, s) int i = 0; char c; int report_once = 1; + int trailingdot = 1; size_t strsz; int ndx = 0; @@ -148,6 +149,16 @@ int parseLine(line, s) report_once--; } } + else if ('.' == p[ndx] && '/' == p[ndx+1] && trailingdot == 0) { + /* If the domain has trailing dot, remove (problem found with squid 3.0 stable1-5) */ + /* if this char is a dot and the next char is a slash, then shift the rest of the string left one char */ + /* We do this only the first time it is encountered. */ + trailingdot++; + size_t sz = strlen(p+ndx+1); + strncpy(p+ndx,p+ndx+1, sz); + p[ndx+sz] = '\0'; + @NOLOG1@ sgLogError("Warning: Possible bypass attempt. Found a trailing dot in the domain name: %s", s->orig); @NOLOG2@ + } else { /* increment the string indexer */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor