SARG ChangeLog
-Feb-13-2011 Version 2.3.3-pre1
+May-21-2012 Version 2.3.3-pre1
- Don't abort the report generation due to an error in a squidGuard error (wrapped over log lines).
- Support for gd, ldap and iconv can be disabled during configuration.
- Suppress the blank line breaking the header of the e-mail report.
- Fix the report generation if users_sites is disabled.
- Avoid a possible name clash among the temporary files if a user happen to have the same name as one of the files sarg generates.
- Accept regular expressions in the hostalias file.
+ - Exclude hosts based on the IPv4 address even if a port number is suffixed after the IP address. (thanks to Mark Easter for reporting the bug).
Dec-07-2011 Version 2.3.2
- Add support for sorttable.js (http://www.kryogenix.org/code/browser/sorttable/) to dynamically sort some tables (thanks to Éric).
int mask, max_mask;
int pad_pos;
int pad_len;
- int bracket=false;
+ bool bracket=false;
+ bool port=false;
+ bool port_num=0;
// skip leading spaces and tabs
while (*buf && (*buf==' ' || *buf=='\t')) buf++;
for (i=0 ; (unsigned char)buf[i]>' ' && buf[i]!='/' && buf[i]!='?' && (!bracket || buf[i]!=']') && ip_size ; i++) {
if (ip_size & 0x04) {
if (isdigit(buf[i])) {
- value4=value4*10+(buf[i]-'0');
- if (value4>0xFFU) ip_size&=~0x04;
+ if (port) {
+ port_num=port_num*10+(buf[i]-'0');
+ if (port_num>65535) ip_size&=~0x04;
+ } else {
+ value4=value4*10+(buf[i]-'0');
+ if (value4>0xFFU) ip_size&=~0x04;
+ }
} else if (buf[i]=='.' && addr_len<4) {
addr[addr_len++]=(unsigned short)(value4 & 0xFFU);
value4=0U;
+ } else if (!port && buf[i]==':') {
+ port=true;
} else {
ip_size&=~0x04;
}