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

Static file creation fails if the requested url has url encoded parts #668

Open
eHtmlu opened this issue Mar 29, 2020 · 0 comments
Open

Comments

@eHtmlu
Copy link

eHtmlu commented Mar 29, 2020

Usually an URL like
/1467084520/b=path/to/minify&f=quick-test.js
could also be written as
/1467084520/b%3Dpath%2Fto%2Fminify%26f%3Dquick-test.js

Such a request works fine as long as the static file is already created. But it fails for file creation.

My suggestion is to urldecode the $query part as shown below:

/static/gen.php (lines 50 - 56)
currently:


// "1467084520"
$requested_cache_dir = $m[1];

// "b=path/to/minify&f=quick-test.js"
$query = $m[2];

suggestion:


// "1467084520"
$requested_cache_dir = $m[1];

// "b=path/to/minify&f=quick-test.js"
$query = urldecode($m[2]);

@eHtmlu eHtmlu changed the title Static file creation fail if the requested url have url encoded parts Static file creation fails if the requested url have url encoded parts Mar 29, 2020
@eHtmlu eHtmlu changed the title Static file creation fails if the requested url have url encoded parts Static file creation fails if the requested url has url encoded parts Mar 29, 2020
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