Fossil SCM

Disallow the word "rawl" (as in crawler) in the user agent.

drh 2011-11-25 09:36 trunk
Commit fe075f5d89f611b3749c5d304b51508f89259fa8
1 file changed +1
--- src/login.c
+++ src/login.c
@@ -364,10 +364,11 @@
364364
int i;
365365
if( zAgent==0 ) return 0;
366366
for(i=0; zAgent[i]; i++){
367367
if( zAgent[i]=='b' && memcmp(&zAgent[i],"bot",3)==0 ) return 0;
368368
if( zAgent[i]=='s' && memcmp(&zAgent[i],"spider",6)==0 ) return 0;
369
+ if( zAgent[i]=='r' && memcmp(&zAgent[i],"rawl",4)==0 ) return 0;
369370
}
370371
if( memcmp(zAgent, "Mozilla/", 8)==0 ){
371372
return atoi(&zAgent[8])>=4;
372373
}
373374
if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
374375
--- src/login.c
+++ src/login.c
@@ -364,10 +364,11 @@
364 int i;
365 if( zAgent==0 ) return 0;
366 for(i=0; zAgent[i]; i++){
367 if( zAgent[i]=='b' && memcmp(&zAgent[i],"bot",3)==0 ) return 0;
368 if( zAgent[i]=='s' && memcmp(&zAgent[i],"spider",6)==0 ) return 0;
 
369 }
370 if( memcmp(zAgent, "Mozilla/", 8)==0 ){
371 return atoi(&zAgent[8])>=4;
372 }
373 if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
374
--- src/login.c
+++ src/login.c
@@ -364,10 +364,11 @@
364 int i;
365 if( zAgent==0 ) return 0;
366 for(i=0; zAgent[i]; i++){
367 if( zAgent[i]=='b' && memcmp(&zAgent[i],"bot",3)==0 ) return 0;
368 if( zAgent[i]=='s' && memcmp(&zAgent[i],"spider",6)==0 ) return 0;
369 if( zAgent[i]=='r' && memcmp(&zAgent[i],"rawl",4)==0 ) return 0;
370 }
371 if( memcmp(zAgent, "Mozilla/", 8)==0 ){
372 return atoi(&zAgent[8])>=4;
373 }
374 if( memcmp(zAgent, "Opera/", 6)==0 ) return 1;
375

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button