Fossil SCM
Disallow the word "rawl" (as in crawler) in the user agent.
Commit
fe075f5d89f611b3749c5d304b51508f89259fa8
Parent
5fdf14ba1cfe8de…
1 file changed
+1
+1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -364,10 +364,11 @@ | ||
| 364 | 364 | int i; |
| 365 | 365 | if( zAgent==0 ) return 0; |
| 366 | 366 | for(i=0; zAgent[i]; i++){ |
| 367 | 367 | if( zAgent[i]=='b' && memcmp(&zAgent[i],"bot",3)==0 ) return 0; |
| 368 | 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; | |
| 369 | 370 | } |
| 370 | 371 | if( memcmp(zAgent, "Mozilla/", 8)==0 ){ |
| 371 | 372 | return atoi(&zAgent[8])>=4; |
| 372 | 373 | } |
| 373 | 374 | if( memcmp(zAgent, "Opera/", 6)==0 ) return 1; |
| 374 | 375 |
| --- 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 |