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

Referer check fails after validation error #14

Open
securez opened this issue Sep 2, 2014 · 1 comment
Open

Referer check fails after validation error #14

securez opened this issue Sep 2, 2014 · 1 comment

Comments

@securez
Copy link

securez commented Sep 2, 2014

This also affects zf2 homepage that use this module.

After any form failed validation, if the form is send again with correct values, the referer check in ContactController->thankYouAction(), redirects to contact again.

This is annoying to users, that don't know if her message was sent.

@dnsahoo
Copy link

dnsahoo commented Apr 8, 2015

Hi,

I am getting following error while adding this contact form module.

Zend\Session\Exception\RuntimeException

File:

F:\xampp\htdocs\zf2\library\Zend\Session\SessionManager.php:111

Message:

Session validation failed

Stack trace:

#0 F:\xampp\htdocs\zf2\library\Zend\Session\AbstractContainer.php(78): Zend\Session\SessionManager->start()
#1 F:\xampp\htdocs\zf2\vendor\zendframework\zend-validator\Zend\Validator\Csrf.php(183): Zend\Session\AbstractContainer->__construct('Zend_Validator_...')
#2 F:\xampp\htdocs\zf2\vendor\zendframework\zend-validator\Zend\Validator\Csrf.php(270): Zend\Validator\Csrf->getSession()
#3 F:\xampp\htdocs\zf2\vendor\zendframework\zend-validator\Zend\Validator\Csrf.php(302): Zend\Validator\Csrf->initCsrfToken()
#4 F:\xampp\htdocs\zf2\vendor\zendframework\zend-validator\Zend\Validator\Csrf.php(222): Zend\Validator\Csrf->generateHash()
#5 F:\xampp\htdocs\zf2\vendor\zendframework\zend-form\Zend\Form\Element\Csrf.php(154): Zend\Validator\Csrf->getHash(true)
#6 F:\xampp\htdocs\zf2\vendor\zendframework\zend-form\Zend\Form\Form.php(213): Zend\Form\Element\Csrf->prepareElement(Object(PhlyContact\Form\ContactForm))
#7 F:\xampp\htdocs\zf2\module\PhlyContact\view\phly-contact\contact\index.phtml(20): Zend\Form\Form->prepare()
#8 F:\xampp\htdocs\zf2\vendor\zendframework\zend-view\Zend\View\Renderer\PhpRenderer.php(506): include('F:\xampp\htdocs...')
#9 F:\xampp\htdocs\zf2\vendor\zendframework\zend-view\Zend\View\View.php(205): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))
#10 F:\xampp\htdocs\zf2\vendor\zendframework\zend-view\Zend\View\View.php(233): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#11 F:\xampp\htdocs\zf2\vendor\zendframework\zend-view\Zend\View\View.php(198): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#12 F:\xampp\htdocs\zf2\vendor\zendframework\zend-mvc\Zend\Mvc\View\Http\DefaultRenderingStrategy.php(103): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#13 [internal function]: Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#14 F:\xampp\htdocs\zf2\vendor\zendframework\zend-eventmanager\Zend\EventManager\EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#15 F:\xampp\htdocs\zf2\vendor\zendframework\zend-eventmanager\Zend\EventManager\EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('render', Object(Zend\Mvc\MvcEvent), Array)
#16 F:\xampp\htdocs\zf2\vendor\zendframework\zend-mvc\Zend\Mvc\Application.php(352): Zend\EventManager\EventManager->trigger('render', Object(Zend\Mvc\MvcEvent))
#17 F:\xampp\htdocs\zf2\vendor\zendframework\zend-mvc\Zend\Mvc\Application.php(327): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#18 F:\xampp\htdocs\zf2\public\index.php(17): Zend\Mvc\Application->run()
#19 {main}

Thanks & Regards,
Dhirendra

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

2 participants