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

NEW: Add Requirements_Backend.nonce_format config #5740

Closed
wants to merge 1 commit into from

Conversation

sminnee
Copy link
Member

@sminnee sminnee commented Jun 28, 2016

This config option can be set to ‘md5’ to use nonces based on the
md5-checksum of the content, rather than filemtime. This can be useful
when sessions aren’t blocking (e.g. when using database-backed sessions)

When sessions aren’t blocking, the CMS combined-files calls will
introduce race conditions that lead to unnecessary reloads of combined
files.

This config option can be set to ‘md5’ to use nonces based on the
md5-checksum of the content, rather than filemtime. This can be useful
when sessions aren’t blocking (e.g. when using database-backed sessions)

When sessions aren’t blocking, the CMS combined-files calls will
introduce race conditions that lead to unnecessary reloads of combined
files.
@@ -1005,6 +1005,16 @@ protected function path_for_file($fileOrUrl) {
}
}

protected function generateNonce($filePath) {
if(!file_exists($filePath)) return 'notfound';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Director::fileExists already checks this above.

@kinglozzer
Copy link
Member

@sminnee SS4 appears to use sha1, do you think this is worth re-submitting against 4?

@sminnee
Copy link
Member Author

sminnee commented Nov 5, 2018

Nah I think I'll cancel this

@sminnee sminnee closed this Nov 5, 2018
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

Successfully merging this pull request may close these issues.

None yet

4 participants