[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.3+ © 2001-2020 PukiWiki Development Team. Powered by PHP 5.6.40-0+deb8u12. HTML convert time: 0.184 sec.

OSDN