Changeset 12434

Show
Ignore:
Timestamp:
07/03/09 17:15:21 (5 months ago)
Author:
BrainSlayer
Message:

disable cross site detection for this file if authentication is disabled

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/router/httpd/httpd.c

    r12235 r12434  
    770770                return; 
    771771        } 
    772         if (referer && host) { 
     772        int nodetect=0; 
     773        if (nvram_invmatch("status_auth", "0") && endswith(file,"Info.htm")) 
     774                nodetect=1; 
     775 
     776        if (referer && host && nodetect==0) { 
    773777                int i; 
    774778                int hlen = strlen(host); 
     
    959963#endif 
    960964                { 
    961                         if ((nvram_match("http_username", DEFAULT_USER) 
     965                        if (((nvram_match("http_username", DEFAULT_USER) 
    962966                             && nvram_match("http_passwd", DEFAULT_PASS)) 
    963967                            || nvram_match("http_username", "") 
    964                             || nvram_match("http_passwd", "admin"))
     968                            || nvram_match("http_passwd", "admin")) && !endswith(file, "About.htm"))
    965969                                changepassword = 1; 
    966970                                if (endswith(file, ".asp"))