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
UrlRewrite showing errors for escape #2822
Comments
GoCD version 18.6:
|
@dbalakirev — what URL did you try and access? |
@ketan that is the thing a bit unfortunately. At the moment I don't know which users action lead to the error, or what URL they tried to access when this happened. |
@varshavaradarajan @arvindsv @ketan
jvm 1 | 2019-12-23 08:15:31,178 INFO [167@MessageListener for ServerPingListener] p.c.g.c.e.k.c.g.c.e.KubernetesPlugin:72 [plugin-cd.go.contrib.elasticagent.kubernetes] - [refresh-pod-state] Pod information successfully synced. All(Running/Pending) pod count is 0.
|
This issue has been automatically marked as stale because it has not had activity in the last 90 days. |
It seems that it's still there, or may be again... (In the latest available release)
|
Yeah, it's still there, have seen it myself. However, there is no obviously broken behaviour that has been associated with this it seems, and nor has anyone spent time tracing examples of the URL accessed that is triggering it, which it won't be addressed without. There are about 70 rewrite rules that use the There is a bug being triggered within this library code by one of the rules containing gocd/server/src/main/webapp/WEB-INF/urlrewrite.xml Lines 25 to 1220 in aca340b
From a brief read of the code and the error, I assume it's a bug triggered if the value of the "variable" part of the URL is empty or something like that. If the errors are coming every ten seconds consistently with a browser opened on a given page, it might might be one of the poll operations, possibly on the stage details or build details. If someone wants to dig further and find a reproducer and some examples URLs via a browser network tab, or some other URL logging on server/backend, I can see if there is a workaround for the noise. There are likely one or more of the rules that have |
As far as I can see it's the call to |
That helps... is that the full URL that you think generated the error - i.e it's the listing of config repos? From looking at the regex, the two related to that route do look a little mind boggling :-) gocd/server/src/main/webapp/WEB-INF/urlrewrite.xml Lines 906 to 916 in aca340b
|
Yes, that's the full URL (except hostname). There are no get-parameters appended to the url. |
Thanks! That helps - I'll look into it. |
After checking this, it seems this is fundamentally a bug in the library code - if a regex capturing group is empty, or has no 1+ char match the rewrite code does not handle the function mapping string manipulation correctly (or it becomes indeterminate). These optional pieces are intentional as there are optional parts of the URLs in same cases (say an optional end piece, or GET specific resources vs GET of collection of resources). However the behavior is a no-op, when it can't find a match it assumes the value is The rules could probably be split into two rules to avoid the optional matches or we could just suppress the logging error by default to avoid this logging noise/confusion. Will think about and apply one of the fixes. |
Issue Type
Summary
Seeing unknown errors related to escape function on the go-server log. Check FunctionReplacer.java.
Basic environment details
16.10
1.8
WINDOWS
Chrome
Log snippets
Code snippets/Screenshots
Any other info
The text was updated successfully, but these errors were encountered: