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

RemoteAddr Validation Issue on Chrome of android #4

Open
weierophinney opened this issue Dec 31, 2019 · 1 comment
Open

RemoteAddr Validation Issue on Chrome of android #4

weierophinney opened this issue Dec 31, 2019 · 1 comment

Comments

@weierophinney
Copy link
Member

Hello

I'm using zend framework 3 and I've added the following validators in my session configuration :

   'session_manager' => [
        'validators' => [
            Zend\Session\Validator\RemoteAddr::class,
            Zend\Session\Validator\HttpUserAgent::class,
        ],
    ],

I have a strange issue in android cellphones/tablets, I get invalid session. I debugged the Zend Session code and I noticed that the 'RemoteAddr' validator returns false on 'isValid' method and it detects different ips on the following line of code :

return ($this->getIpAddress() === $this->getData());

I don't understand why the '$this->getIpAddress()' is different from '$this->getData()'. While I don't have this issue in my laptop, and also firefox browser on android does not have this issue.

Do you have any clue what is the problem and how can I solve this to work on android chrome ?


Originally posted by @alenoosh at zendframework/zend-session#113

@weierophinney
Copy link
Member Author

When you use RemoteAddr and HttpUserAgent in combination with Zend 3 you get this result. This is a bug and I`m sure it will be fixed, for now just comment //Zend\Session\Validator\HttpUserAgent::class and no more error.


Originally posted by @Mecanik at zendframework/zend-session#113 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant