File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
2- $ functions_ver =20250608 ;
2+ $ functions_ver =20250613 ;
33//編集モードログアウト
44function logout (): void {
55 session_sta ();
@@ -628,6 +628,9 @@ function get_uip(): string {
628628 $ ips = explode (', ' , $ ip );
629629 $ ip = $ ips [0 ];
630630 }
631+ if (filter_var ($ ip , FILTER_VALIDATE_IP ) === false ){
632+ return $ ip = '' ;
633+ }
631634 return $ ip ;
632635}
633636
@@ -1188,8 +1191,10 @@ function is_badhost(): bool {
11881191
11891192 if ($ host === $ userip ){//ホスト名がipアドレスになる場合は
11901193 if ($ reject_if_no_reverse_dns ){
1191- $ _SESSION ['is_badhost ' ] = true ;
1192- return true ; //リバースDNSがない場合は拒絶
1194+ if (filter_var ($ userip , FILTER_VALIDATE_IP ,FILTER_FLAG_IPV4 )){//IPv4アドレスなら
1195+ $ _SESSION ['is_badhost ' ] = true ;
1196+ return true ; //リバースDNSがない場合は拒絶
1197+ }
11931198 }
11941199 foreach ($ badhost as $ value ){
11951200 if (preg_match ("/\A $ value/i " ,$ host )) {//前方一致
Original file line number Diff line number Diff line change 11<?php
22//Petit Note (c)さとぴあ @satopian 2021-2025
33//1スレッド1ログファイル形式のスレッド式画像掲示板
4- $ petit_ver ='v1.91.2 ' ;
5- $ petit_lot ='lot.20250609 ' ;
4+ $ petit_ver ='v1.91.3 ' ;
5+ $ petit_lot ='lot.20250613 ' ;
66
77$ lang = ($ http_langs = $ _SERVER ['HTTP_ACCEPT_LANGUAGE ' ] ?? '' )
88 ? explode ( ', ' , $ http_langs )[0 ] : '' ;
1818 die (__DIR__ .'/functions.php ' .($ en ? ' does not exist. ' :'がありません。 ' ));
1919}
2020require_once (__DIR__ .'/functions.php ' );
21- if (!isset ($ functions_ver )||$ functions_ver <20250608 ){
21+ if (!isset ($ functions_ver )||$ functions_ver <20250613 ){
2222 die ($ en ?'Please update functions.php to the latest version. ' :'functions.phpを最新版に更新してください。 ' );
2323}
2424
You can’t perform that action at this time.
0 commit comments