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

ActionController::UrlGenerationError exceptions in Whitehall #371

Open
floehopper opened this issue Dec 29, 2017 · 5 comments
Open

ActionController::UrlGenerationError exceptions in Whitehall #371

floehopper opened this issue Dec 29, 2017 · 5 comments
Labels

Comments

@floehopper
Copy link
Contributor

I suspect these exceptions in the Whitehall app might be related to alphagov/whitehall#3627.

@floehopper floehopper added the bug label Dec 29, 2017
@floehopper floehopper self-assigned this Dec 29, 2017
@floehopper
Copy link
Contributor Author

Prior to alphagov/whitehall#3627, a request for this URL would've generated a 404 Not Found response from PublicUploadsController#fail, because no file with the specified path/filename exists in either the clean or incoming directories.

The URL itself is somewhat mysterious, because it contains Unicode non-breaking spaces (%C2A0) rather than underscore characters and a newline character (%0A) in the filename. This makes me suspicious that the URL was manually generated, perhaps by being copied and pasted from a document which resulted in the unhelpful characters. Unfortunately the HTTP_REFERER request header is not set and so it's hard to work out the origin of the request.

The ActionController::UrlGenerationError exception is the result of the following:

I'm not entirely sure what to do about this problem, but I am confident that it's not a serious issue because of the following:

Thus I really don't think this is a serious problem and am happy to leave it until I can discuss it with @chrisroos & @chrislo on their return from holiday.

@floehopper
Copy link
Contributor Author

This exception has just happened a bunch more times...

Staging

Production

They all look as if they relate to requests with a newline in the asset path. I wonder if there's some systematic problem - could Govspeak be accidentally generating URL paths including newlines?

@chrislo, @chrisroos: Do you have any thoughts on this?

@floehopper
Copy link
Contributor Author

I'm no longer actively investigating this, so I'm going to un-assign myself.

@floehopper floehopper removed their assignment Jan 9, 2018
@floehopper
Copy link
Contributor Author

This has happened again: https://sentry.io/govuk/app-whitehall/issues/434107507/

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

No branches or pull requests

2 participants