Changeset 12394
- Timestamp:
- Oct 9, 2011, 3:52:14 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Mail_supervisor/main.inc.php
r11841 r12394 292 292 $user_ip=$_SERVER["REMOTE_ADDR"]; 293 293 294 $pattern ="/(((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]{1}[0-9]|[1-9])\.){1}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9])\.){2}((25[0-5]|2[0-4][0-9]|[1]{1}[0-9]{2}|[1-9]{1}[0-9]|[0-9]){1}))/" ; 295 $local=preg_match($pattern,$user_ip); 294 296 295 297 $file = $pwd.'/.htpasswd'; 296 298 $htmes1 =$conf['db_user'].":".$conf['db_password']."\n"; 297 299 $htmes2 =$conf['db_user'].":".crypt($conf['db_password'], 'rl')."\n"; 298 if(preg_match("/free/i",$server) )300 if(preg_match("/free/i",$server)||$local) 299 301 $htmes=$htmes1; 300 302 else … … 318 320 $AuthUserFile='PerlSetVar AuthFile '.$racine.'/_data/Pwd' .'/.htpasswd'; 319 321 }else{ 320 $AuthUserFile='AuthUserFile '.realpath($pwd).'/.htpasswd'."\n".'AuthGroupFile /dev/null'; 321 } 322 if($local) 323 $AuthUserFile='AuthUserFile '.realpath($pwd).'\\.htpasswd'."\n".'AuthGroupFile /dev/null'; 324 else 325 $AuthUserFile='AuthUserFile '.realpath($pwd).'\\.htpasswd'."\n".'AuthGroupFile /dev/null'; 326 } 327 322 328 //============================================================ 323 329 $htmes=$AuthUserFile."\n".
Note: See TracChangeset
for help on using the changeset viewer.