[proxy.php] Regular expression parity check incorrect for in_the_net

メッセージ

Because the regular expression used as PKWK_CIDR_NETWORK_REGEX is the following:

"/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\/([0-9.]+))?$/"

Which shorthands to:

"/^((\d{1,3}){4})(?:\/([0-9.]+))?$/"

An invalid IP address can be used in this check, but it's somewhat of a limitation of brackets for recursion. The following IP addresses are valid with the above regular expression as \d refers to numeric data.

The following IP addresses are valid with the regular expression used:

999.999.999.999
090.090.090.090
000.000.000.000

Again, it's not a HUGE thing but it will throw an error and waste processing time when ip2long is called and the (erroneous) IP address is used.

Regards,




トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-04-24 (木) 19:53:00
Site admin: PukiWiki Development Team

PukiWiki 1.5.4+ © 2001-2022 PukiWiki Development Team. Powered by PHP 8.2.12. HTML convert time: 0.174 sec.

SourceForge