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

no new token generated for each requests #5

Closed
exenza opened this issue Aug 23, 2017 · 4 comments
Closed

no new token generated for each requests #5

exenza opened this issue Aug 23, 2017 · 4 comments

Comments

@exenza
Copy link
Contributor

exenza commented Aug 23, 2017

When a request is submitted and validated the same token is used for new requests.

I've changed line 72 which was originally only returning a boolean and I'm generating a new token if the original one is consumed:

		if(static::compare($request_data[$token_name], static::getToken($token_name))){
			static::generateToken($token_name);
			return true;
		} else {
			return false;
		}
@volnix
Copy link
Owner

volnix commented Aug 23, 2017

Makes sense. Good catch! Feel free to submit a PR and I'll approve/merge.

@exenza
Copy link
Contributor Author

exenza commented Aug 24, 2017

Done, here the PR: #6

@ridaamirini
Copy link

ridaamirini commented Nov 16, 2017

But whats about if i have three forms opened at the same time and i one of them get submitted ? The token is consumed by the first submitted form but whats about the two other forms with the same token they are invalid afterwards.

@ridaamirini
Copy link

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

3 participants