Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IpHelper does not detect invalid IP addresses #32

Open
nibra opened this issue Apr 1, 2021 · 0 comments · May be fixed by #33
Open

IpHelper does not detect invalid IP addresses #32

nibra opened this issue Apr 1, 2021 · 0 comments · May be fixed by #33
Assignees
Labels

Comments

@nibra
Copy link
Contributor

nibra commented Apr 1, 2021

Steps to reproduce the issue

use Joomla\Utilities\IpHelper;

// Prepare SERVER array
$_SERVER['REMOTE_ADDR'] = 'fake';

// Prepare IpHelper singleton
IpHelper::setAllowIpOverrides(false);
IpHelper::setIp(null);

// Retrieve IP address
echo IpHelper::getIp();

Expected result

Empty string

Actual result

fake

@nibra nibra self-assigned this Apr 1, 2021
@nibra nibra added the bug label Apr 1, 2021
@nibra nibra linked a pull request Apr 1, 2021 that will close this issue
@nibra nibra linked a pull request Apr 1, 2021 that will close this issue
nibra added a commit that referenced this issue Aug 14, 2022
Make sure that unpacked files stay below target directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant