diff options
author | Marc Alexander <admin@m-a-styles.de> | 2017-07-10 21:17:52 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2017-07-10 21:17:52 +0200 |
commit | fa631947f15754a50379598d83cb237bbfac2cca (patch) | |
tree | 53da6c535b1466b5d50ebbf9393f757572b6265b /tests/avatar | |
parent | [ticket/security/210] Prevent using IP addresses or ports for remote avatar (diff) | |
download | phpbb-fa631947f15754a50379598d83cb237bbfac2cca.tar.gz phpbb-fa631947f15754a50379598d83cb237bbfac2cca.tar.bz2 phpbb-fa631947f15754a50379598d83cb237bbfac2cca.zip |
[ticket/security/210] Adjust regex and add tests for IPv6
SECURITY-210
Diffstat (limited to 'tests/avatar')
-rw-r--r-- | tests/avatar/manager_test.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index 8016d75dfb..802e71939d 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -377,12 +377,15 @@ class phpbb_avatar_manager_test extends \phpbb_database_test_case { return array( array('127.0.0.1:91?foo.jpg', 80, 80, array('AVATAR_URL_INVALID')), - array(gethostbyname('secure.gravatar.com') . '/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80), + array(gethostbyname('secure.gravatar.com') . '/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), array('secure.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80), array(gethostbyname('secure.gravatar.com') . ':120/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), array('secure.gravatar.com:80/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), array('secure.gravatar.com:80?55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), array('secure.gravatar.com?55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), // should be a 404 + array('2001:db8:0:0:0:0:2:1/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), + array('secure.gravatar.com/2001:db8:0:0:0:0:2:1/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), + array('secure.gravatar.com/127.0.0.1:80/avatar/55502f40dc8b7c769880b10874abc9d0.jpg', 80, 80, array('AVATAR_URL_INVALID')), ); } |