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

UrlRewrite showing errors for escape #2822

Closed
varshavaradarajan opened this issue Oct 28, 2016 · 12 comments · Fixed by #11692
Closed

UrlRewrite showing errors for escape #2822

varshavaradarajan opened this issue Oct 28, 2016 · 12 comments · Fixed by #11692
Labels
bug no stalebot Don't mark this stale. technical

Comments

@varshavaradarajan
Copy link
Member

Issue Type
  • Bug Report
Summary

Seeing unknown errors related to escape function on the go-server log. Check FunctionReplacer.java.

Basic environment details
  • Go Version: 16.10
  • JAVA Version: 1.8
  • OS: WINDOWS
  • Browser vendor and version (if relevant): Chrome
Log snippets
2016-10-25 15:39:40,281  INFO [qtp67988628-17143] /go:2052 - org.tuckey.web.filters.urlrewrite.VariableReplacer ERROR: function ${escape:} type 'escape:' not a valid type
Code snippets/Screenshots
Any other info
@dbalakirev
Copy link

GoCD version 18.6:

2018-07-20 10:21:11,918 ERROR [qtp1260134048-6919503] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
2018-07-20 10:21:12,218 ERROR [qtp1260134048-8386351] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type

@ketan
Copy link
Member

ketan commented Jul 20, 2018

@dbalakirev — what URL did you try and access?

@dbalakirev
Copy link

@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.

@maheshmadpathi
Copy link

maheshmadpathi commented Dec 23, 2019

@varshavaradarajan @arvindsv @ketan
The issue still exists, any idea??

  • Basic environment details
    GoCD Version: 19.11.0
    java version 1.7.0_231
    OS: Linux
    K8s Version: AWS EKS 1.14
    helm: 3
    Browser vendor and version (if relevant): Chrome

  • Log snippet

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.
jvm 1 | 2019-12-23 08:15:41,381 ERROR [qtp2013268532-36] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:15:51,374 ERROR [qtp2013268532-27] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16:01,398 ERROR [qtp2013268532-34] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16:11,413 ERROR [qtp2013268532-33] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16:21,427 ERROR [qtp2013268532-42] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16: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.
jvm 1 | 2019-12-23 08:16:31,447 ERROR [qtp2013268532-36] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16:41,474 ERROR [qtp2013268532-33] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:16:51,509 ERROR [qtp2013268532-40] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:17:01,536 ERROR [qtp2013268532-31] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:17:11,550 ERROR [qtp2013268532-23] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
jvm 1 | 2019-12-23 08:17:21,569 ERROR [qtp2013268532-30] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type

@stale
Copy link

stale bot commented Apr 1, 2020

This issue has been automatically marked as stale because it has not had activity in the last 90 days.
If you can still reproduce this error on the master branch using local development environment or on the latest GoCD Release, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@stale stale bot added the stale label Apr 1, 2020
@stale stale bot closed this as completed Apr 8, 2020
@eBeyond
Copy link

eBeyond commented Jun 14, 2023

It seems that it's still there, or may be again... (In the latest available release)

2023-06-14 13:40:18,693 ERROR [qtp1970732060-40] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
2023-06-14 13:40:28,772 ERROR [qtp1970732060-32] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
2023-06-14 13:40:38,820 ERROR [qtp1970732060-43] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type
2023-06-14 13:40:48,900 ERROR [qtp1970732060-29] VariableReplacer:385 - function ${escape:} type 'escape:' not a valid type

@chadlwilson
Copy link
Member

chadlwilson commented Jun 14, 2023

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 ${escape:} function so need to work out what it is.

There is a bug being triggered within this library code by one of the rules containing ${escape: within

<urlrewrite>
<rule>
<name>Internal Secret Configs API</name>
<from>^/api/admin/internal/secret_configs$</from>
<to last="true">/spark/api/admin/internal/secret_configs</to>
</rule>
<rule>
<name>Internal Agents API for agent-server communication</name>
<from> /remoting/api/agent/(.*)$</from>
<to last="true">/spark/remoting/api/agent/${escape:$1}</to>
</rule>
<rule>
<name>Preference SPA</name>
<from>^/preferences/notifications(/?)$</from>
<to last="true">/spark/preferences/notifications</to>
</rule>
<rule>
<name>Internal Materials URL for listing modifications</name>
<from>^/api/internal/materials/([^/]+)/modifications(/?)$</from>
<to last="true">/spark/api/internal/materials/${escape:$1}/modifications</to>
</rule>
<rule>
<name>Internal Materials URL</name>
<from>^/api/internal/materials(/?)$</from>
<to last="true">/spark/api/internal/materials</to>
</rule>
<rule>
<name>Internal Materials URL for usages</name>
<from>^/api/internal/materials/([^/]+)/(usages|trigger_update)(/?)$</from>
<to last="true">/spark/api/internal/materials/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Update Check URLs</name>
<from>^/(api/version_infos/.*)$</from>
<to last="true">/spark/$1</to>
</rule>
<rule>
<name>Materials SPA</name>
<from>^/materials(/?)$</from>
<to last="true">/spark/materials</to>
</rule>
<rule>
<name>Template Config SPA</name>
<from>^/admin/templates/([^/]+)/edit(/?)$</from>
<to last="true">/spark/admin/templates/${escape:$1}/edit</to>
</rule>
<rule>
<name>Package Repositories Internal Verify Connection API</name>
<from>^/api/admin/internal/repositories/verify_connection(/?)$</from>
<to last="true">/spark/api/admin/internal/repositories/verify_connection</to>
</rule>
<rule>
<name>Packages Internal Verify Connection API</name>
<from>^/api/admin/internal/packages/verify_connection(/?)$</from>
<to last="true">/spark/api/admin/internal/packages/verify_connection</to>
</rule>
<rule>
<name>SCMs Internal Verify Connection API</name>
<from>^/api/admin/internal/scms/verify_connection(/?)$</from>
<to last="true">/spark/api/admin/internal/scms/verify_connection</to>
</rule>
<rule>
<name>Pluggable SCMs SPA</name>
<from>^/admin/scms(/?)$</from>
<to last="true">/spark/admin/scms</to>
</rule>
<rule>
<name>Internal Dependency Pipelines API</name>
<from>^/api/internal/pipelines/([^/]+)/([^/]+)/upstream(/?)$</from>
<to last="true">/spark/api/internal/pipelines/${escape:$1}/${escape:$2}/upstream</to>
</rule>
<rule>
<name>Package Repositories SPA with toggle</name>
<from>^/admin/package_repositories(/?)$</from>
<to last="true">/spark/admin/package_repositories</to>
</rule>
<rule>
<name>Package Repositories SPA with toggle</name>
<from>^/admin/package_repositories/(.*)$</from>
<to last="true">/spark/admin/package_repositories</to>
</rule>
<rule>
<name>Clicky pipeline config SPA</name>
<from>^/admin/pipelines/([^/]+)/edit(/?)$</from>
<to last="true">/spark/admin/pipelines/${escape:$1}/edit</to>
</rule>
<rule>
<name>Permissions API</name>
<from>^/api/auth/permissions(/?)$</from>
<to last="true">/spark/api/auth/permissions</to>
</rule>
<rule>
<name>Internal Compare APIs</name>
<from>^/api/internal/compare/([^/]+)/list(/?)$</from>
<to last="true">/spark/api/internal/compare/${escape:$1}/list</to>
</rule>
<rule>
<name>Webhook PR Trigger API</name>
<from>^/api/webhooks/([^/]+)/config_repos/([^/]+)(/?)$</from>
<to last="true">/spark/api/webhooks/${escape:$1}/config_repos/${escape:$2}</to>
</rule>
<rule>
<name>Webhook Notify API</name>
<from>^/api/webhooks/([^/]+)/notify(/?)$</from>
<to last="true">/spark/api/webhooks/${escape:$1}/notify</to>
</rule>
<rule>
<name>Feed APIs</name>
<from>^/api/feed/(.*)$</from>
<to last="true">/spark/api/feed/$1</to>
</rule>
<rule>
<name>Notification filter API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v2)*\+json</condition>
<from>^/api/notification_filters(/?)$</from>
<to last="true">/spark/api/notification_filters</to>
</rule>
<rule>
<name>APIs info API</name>
<from>^/api/internal/apis(/?)$</from>
<to last="true">/spark/api/internal/apis</to>
</rule>
<rule>
<name>Notification filter CRUD APIs</name>
<condition name="Accept">application\/vnd\.go\.cd(.v2)*\+json</condition>
<from>^/api/notification_filters/(.*)$</from>
<to last="true">/spark/api/notification_filters/${escape:$1}</to>
</rule>
<rule>
<name>Material Test API</name>
<from>^/api/admin/internal/material_test(/?)$</from>
<to last="true">/spark/api/admin/internal/material_test</to>
</rule>
<rule>
<name>Agent Job History API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/agents/([^/]+)/job_run_history(/?)$</from>
<to last="true">/spark/api/agents/$1/job_run_history</to>
</rule>
<rule>
<name>Agent Details Page Redirect to Agent Job History Page</name>
<from>^/agents/([^/]+)(/?)$</from>
<to type="redirect" last="true">/go/agents/${escape:$1}/job_run_history</to>
</rule>
<rule>
<name>Agent Job History Page</name>
<from>^/agents/([^/]+)/job_run_history(/?)$</from>
<to last="true">/spark/agents/${escape:$1}/job_run_history</to>
</rule>
<rule>
<name>admin_templates UI</name>
<from>^/admin/templates(/?)$</from>
<to last="true">/spark/admin/templates</to>
</rule>
<rule>
<name>pipeline_activity UI</name>
<from>^/pipeline/activity/(.+)$</from>
<to last="true">/spark/pipeline/activity/$1</to>
</rule>
<rule>
<name>admin_pipelines UI</name>
<from>^/admin/pipelines(/?)$</from>
<to last="true">/spark/admin/pipelines</to>
</rule>
<rule>
<name>server-configuration UI</name>
<from>^/admin/config/server(/?)$</from>
<to last="true">/spark/admin/server_configuration</to>
</rule>
<rule>
<name>Package Definitions API</name>
<from>^/api/admin/packages(/?)$</from>
<to last="true">/spark/api/admin/packages</to>
</rule>
<rule>
<name>Package Definitions CRUD APIs</name>
<from>^/api/admin/packages/(.*)$</from>
<to last="true">/spark/api/admin/packages/${escape:$1}</to>
</rule>
<rule>
<name>Packages Usages API</name>
<from>^/api/admin/packages/([^/]+)/usages(/?)$</from>
<to last="true">/spark/api/admin/packages/${escape:$1}/usages</to>
</rule>
<rule>
<name>Package Repositories API</name>
<from>^/api/admin/repositories(/?)$</from>
<to last="true">/spark/api/admin/repositories</to>
</rule>
<rule>
<name>Package Repositories CRUD APIs</name>
<from>^/api/admin/repositories/(.*)$</from>
<to last="true">/spark/api/admin/repositories/${escape:$1}</to>
</rule>
<rule>
<name>New Elastic Agent Configuration Page</name>
<from>^/admin/elastic_agents(/?)$</from>
<to type="redirect" last="true">/go/admin/elastic_agent_configurations</to>
</rule>
<rule>
<name>default-job-timeout</name>
<from>^/api/admin/config/server/default_job_timeout$</from>
<to last="true">/spark/api/admin/config/server/default_job_timeout</to>
</rule>
<rule>
<name>artifacts API</name>
<from>^/api/admin/config/server/artifact_config$</from>
<to last="true">/spark/api/admin/config/server/artifact_config</to>
</rule>
<rule>
<name>environments UI</name>
<from>^/admin/environments(/?)$</from>
<to last="true">/spark/admin/new-environments</to>
</rule>
<rule>
<name>Spark Job History API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/jobs/([^/]+)/([^/]+)/([^/]+)/history(/?)</from>
<to last="true">/spark/api/jobs/${escape:$1}/${escape:$2}/${escape:$3}/history</to>
</rule>
<rule>
<name>Spark pipeline pause/unpause/unlock/trigger_view API/schedule API</name>
<from>^/api/pipelines/([^/]+)/(pause|unpause|unlock|trigger_options|schedule)</from>
<to last="true">/spark/api/pipelines/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark Job Instance API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/jobs/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)(/?)</from>
<to last="true">/spark/api/jobs/${escape:$1}/${escape:$2}/${escape:$3}/${escape:$4}/${escape:$5}</to>
</rule>
<rule>
<name>Comparison UI</name>
<from>^/compare/([^/]+)/([^/]+)/with/([^/]+)(/?)$</from>
<to last="true">/spark/compare/${escape:$1}/${escape:$2}/with/${escape:$3}</to>
</rule>
<rule>
<name>Compare API</name>
<from>^/api/pipelines/([^/]+)/compare/([^/]+)/([^/]+)(/?)$</from>
<to last="true">/spark/api/pipelines/${escape:$1}/compare/${escape:$2}/${escape:$3}</to>
</rule>
<rule>
<name>Pipeline Status API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/pipelines/([^/]+)/status(/?)$</from>
<to last="true">/spark/api/pipelines/${escape:$1}/status</to>
</rule>
<rule>
<name>Pipeline History API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/pipelines/([^/]+)/history$</from>
<to last="true">/spark/api/pipelines/${escape:$1}/history</to>
</rule>
<rule>
<name>Pipeline Instance API V1 and latest</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/pipelines/([^/]+)/([^/]+)(/?)$</from>
<to last="true">/spark/api/pipelines/${escape:$1}/${escape:$2}/instance</to>
</rule>
<rule>
<name>Pipeline Instance comment API</name>
<condition name="Accept">application\/vnd\.go\.cd(.v*)*\+json</condition>
<from>^/api/pipelines/([^/]+)/([^/]+)/comment$</from>
<to last="true">/spark/api/pipelines/${escape:$1}/${escape:$2}/comment</to>
</rule>
<rule>
<name>Feature Toggles Index API</name>
<from>^/api/admin/feature_toggles(/?)$</from>
<to last="true">/spark/api/admin/feature_toggles</to>
</rule>
<rule>
<name>Feature Toggles Index API</name>
<from>^/api/admin/feature_toggles/(.*)$</from>
<to last="true">/spark/api/admin/feature_toggles/${escape:$1}</to>
</rule>
<rule>
<name>Pipeline Structure Internal API</name>
<from>^/api/internal/pipeline_structure(/?)$</from>
<to last="true">/spark/api/internal/pipeline_structure</to>
</rule>
<rule>
<name>Pipeline Groups Internal API</name>
<from>^/api/internal/pipeline_groups(/?)$</from>
<to last="true">/spark/api/internal/pipeline_groups</to>
</rule>
<rule>
<name>pipeline_configs UI</name>
<from>^/admin/pipeline_configs(/?)$</from>
<to last="true">/spark/admin/pipeline_configs</to>
</rule>
<rule>
<name>Mailhost API</name>
<from>^/api/config/mailserver(/?)$</from>
<to last="true">/spark/api/config/mailserver</to>
</rule>
<rule>
<name>Mailhost Test Email API</name>
<from>^/api/config/mailserver/test$</from>
<to last="true">/spark/api/config/mailserver/test</to>
</rule>
<rule>
<name>Internal Resources API</name>
<from>^/api/admin/internal/resources$</from>
<to last="true">/spark/api/admin/internal/resources</to>
</rule>
<rule>
<name>Internal Environment API</name>
<from>^/api/admin/internal/environments$</from>
<to last="true">/spark/api/admin/internal/environments</to>
</rule>
<rule>
<name>Internal Environment Merged API</name>
<from>^/api/admin/internal/environments/merged$</from>
<to last="true">/spark/api/admin/internal/environments/merged</to>
</rule>
<rule>
<name>Internal Environment Agents Association upate API</name>
<from>^/api/admin/internal/environments/([^/]+)</from>
<to last="true">/spark/api/admin/internal/environments/${escape:$1}</to>
</rule>
<rule>
<name>Backup Config API</name>
<from>^/api/config/backup$</from>
<to last="true">/spark/api/config/backup</to>
</rule>
<rule>
<name>Server Info About SPA</name>
<from>^/about(/?)$</from>
<to last="true">/spark/about</to>
</rule>
<rule>
<name>Spark Materials Index API</name>
<from>^/api/config/materials(/?)$</from>
<to last="true">/spark/api/config/materials</to>
</rule>
<rule>
<name>Spark Material Modifications API</name>
<from>^/api/materials/([^/]+)/modifications(/?)$</from>
<to last="true">/spark/api/materials/${escape:$1}/modifications</to>
</rule>
<rule>
<name>Spark Material Modifications with offset API</name>
<from>^/api/materials/([^/]+)/modifications/([^/+])(/?)$</from>
<to last="true">/spark/api/materials/${escape:$1}/modifications/${escape:$2}</to>
</rule>
<rule>
<name>Spark Material Notify API</name>
<from>^/api/admin/materials/(svn|git|hg|scm)/notify(/?)$</from>
<to last="true">/spark/api/admin/materials/${escape:$1}/notify</to>
</rule>
<rule>
<name>secret_configs UI</name>
<from>^/admin/secret_configs(/?)$</from>
<to last="true">/spark/admin/secret_configs</to>
</rule>
<rule>
<name>Login page</name>
<from>^/auth/login(/?)$</from>
<to last="true">/spark/auth/login</to>
</rule>
<rule>
<name>Logout page</name>
<from>^/auth/logout(/?)$</from>
<to last="true">/spark/auth/logout</to>
</rule>
<rule>
<name>CCTray feed</name>
<from>/cctray.xml</from>
<to last="true">/spark/cctray.xml</to>
</rule>
<rule>
<name>API support</name>
<from>^/api/support</from>
<to last="true">/spark/api/support</to>
</rule>
<rule>
<name>Process list AP</name>
<from>^/api/support/process_list</from>
<to last="true">/spark/api/support/process_list</to>
</rule>
<rule>
<name>Admin Access Tokens SPA</name>
<from>^/admin/admin_access_tokens(/?)$</from>
<to last="true">/spark/admin/admin_access_tokens</to>
</rule>
<rule>
<name>User Search API</name>
<from>^/api/user_search(/?)$</from>
<to last="true">/spark/api/user_search</to>
</rule>
<rule>
<name>Spark Plugin Settings Create API</name>
<from>^/api/admin/plugin_settings(/?)$</from>
<to last="true">/spark/api/admin/plugin_settings</to>
</rule>
<rule>
<name>Spark Plugin Settings Get and Update API</name>
<from>^/api/admin/plugin_settings/(.*)$</from>
<to last="true">/spark/api/admin/plugin_settings/${escape:$1}</to>
</rule>
<rule>
<name>Spark Cluster Profile Index API</name>
<from>^/api/admin/elastic/cluster_profiles(/?)$</from>
<to last="true">/spark/api/admin/elastic/cluster_profiles</to>
</rule>
<rule>
<name>Spark Cluster Profile Get API</name>
<from>^/api/admin/elastic/cluster_profiles/(.*)$</from>
<to last="true">/spark/api/admin/elastic/cluster_profiles/${escape:$1}</to>
</rule>
<rule>
<name>Spark Pluggable SCMs Index API</name>
<from>^/api/admin/scms(/?)$</from>
<to last="true">/spark/api/admin/scms</to>
</rule>
<rule>
<name>Spark Pluggable SCM CRUD API</name>
<from>^/api/admin/scms/(.*)$</from>
<to last="true">/spark/api/admin/scms/${escape:$1}</to>
</rule>
<rule>
<name>Spark Plugin Info Index API</name>
<from>^/api/admin/plugin_info(/?)$</from>
<to last="true">/spark/api/admin/plugin_info</to>
</rule>
<rule>
<name>Spark Plugin Info Get API</name>
<from>^/api/admin/plugin_info/(.*)$</from>
<to last="true">/spark/api/admin/plugin_info/${escape:$1}</to>
</rule>
<rule>
<name>Spark Users Index API</name>
<from>^/api/users(/?)$</from>
<to last="true">/spark/api/users</to>
</rule>
<rule>
<name>Spark Users Show and Delete API</name>
<from>^/api/users/(.*)$</from>
<to last="true">/spark/api/users/${escape:$1}</to>
</rule>
<rule>
<name>Access Token Index and Create API</name>
<from>^/api/(current_user|admin)/access_tokens(/?)$</from>
<to last="true">/spark/api/$1/access_tokens</to>
</rule>
<rule>
<name>Spark Access Token Show API</name>
<from>^/api/(current_user|admin)/access_tokens/(.*)$</from>
<to last="true">/spark/api/$1/access_tokens/${escape:$2}</to>
</rule>
<rule>
<name>Spark Access Token Revoke API</name>
<from>^/api/(current_user|admin)/access_tokens/([^/]+)/([^/]+)/revoke</from>
<to last="true">/spark/api/$1/access_tokens/${escape:$2}/${escape:$3}/revoke</to>
</rule>
<rule>
<name>users UI</name>
<from>^/admin/users(/?)$</from>
<to last="true">/spark/admin/users</to>
</rule>
<rule>
<name>backup UI</name>
<from>^/admin/backup(/?)$</from>
<to last="true">/spark/admin/backup</to>
</rule>
<rule>
<name>Current Version detail</name>
<from>^/api/version$</from>
<to last="true">/spark/api/version</to>
</rule>
<rule>
<name>Root page</name>
<from>^/(home)?/?$</from>
<to type="redirect" last="true">/go/pipelines</to>
</rule>
<rule>
<name>Spark Secret Configs Index API</name>
<from>^/api/admin/secret_configs$</from>
<to last="true">/spark/api/admin/secret_configs</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Spark Secret Configs API</name>
<from>^/api/admin/secret_configs/(.*)$</from>
<to last="true">/spark/api/admin/secret_configs/${escape:$1}</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Spark Elastic Profile Index API</name>
<from>^/api/elastic/profiles$</from>
<to last="true">/spark/api/elastic/profiles</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Spark Elastic Profiles API</name>
<from>^/api/elastic/profiles/(.*)$</from>
<to last="true">/spark/api/elastic/profiles/${escape:$1}</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Spark Elastic Profiles Usage API</name>
<from>^/api/internal/elastic/profiles/(.*)/usages$</from>
<to last="true">/spark/api/internal/elastic/profiles/${escape:$1}/usages</to>
</rule>
<rule>
<name>Spark Artifact Store Index API</name>
<from>^/api/admin/artifact_stores(/?)$</from>
<to last="true">/spark/api/admin/artifact_stores</to>
</rule>
<rule>
<name>Spark Artifact Store API</name>
<from>^/api/admin/artifact_stores/(.*)$</from>
<to last="true">/spark/api/admin/artifact_stores/${escape:$1}</to>
</rule>
<rule>
<name>Spark Environment Index API</name>
<from>^/api/admin/environments(/?)$</from>
<to last="true">/spark/api/admin/environments</to>
</rule>
<rule>
<name>Spark Environment CRUD API</name>
<from>^/api/admin/environments/(.*)$</from>
<to last="true">/spark/api/admin/environments/${escape:$1}</to>
</rule>
<rule>
<name>Spark Config Export API</name>
<from>^/api/admin/export/(pipelines)/([^/]+)(?:/?)$</from>
<to last="true">/spark/api/admin/export/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark Pipeline Config API</name>
<from>^/api/admin/pipelines(?:(/)([^/]+))?(?:/?)$</from>
<to last="true">/spark/api/admin/pipelines$1${escape:$2}</to>
</rule>
<rule>
<name>Spark API to extract template from pipeline config</name>
<from>^/api/admin/pipelines/([^/]+)/extract_to_template(/?)$</from>
<to last="true">/spark/api/admin/pipelines/${escape:$1}/extract_to_template</to>
</rule>
<rule>
<name>Spark Pipeline Groups Index API</name>
<from>^/api/admin/pipeline_groups(/?)$</from>
<to last="true">/spark/api/admin/pipeline_groups</to>
</rule>
<rule>
<name>Spark Pipeline Groups API</name>
<from>^/api/admin/pipeline_groups/(.*)$</from>
<to last="true">/spark/api/admin/pipeline_groups/${escape:$1}</to>
</rule>
<rule>
<name>Spark Template Config Index API</name>
<from>^/api/admin/templates(/?)$</from>
<to last="true">/spark/api/admin/templates</to>
</rule>
<rule>
<name>Template Authorization Config API</name>
<from>^/api/admin/templates/([^/]+)/authorization(/?)$</from>
<to last="true">/spark/api/admin/templates/${escape:$1}/authorization</to>
</rule>
<rule>
<name>Spark Template Config API for parameters</name>
<from>^/api/admin/templates/([^/]+)/parameters(/?)$</from>
<to last="true">/spark/api/admin/templates/${escape:$1}/parameters</to>
</rule>
<rule>
<name>Spark Template Config API</name>
<from>^/api/admin/templates/(.*)$</from>
<to last="true">/spark/api/admin/templates/${escape:$1}</to>
</rule>
<rule>
<name>Rails API for the job run history api</name>
<from>^/api/agents/([^/]+)/job_run_history(?:(?:/)(.*))?(?:/?)$</from>
<to last="true">/rails/api/agents/$1/job_run_history/$2</to>
</rule>
<rule>
<name>Spark Agents Index API</name>
<from>^/api/agents$</from>
<to last="true">/spark/api/agents</to>
</rule>
<rule>
<name>Agent Force Cancel API</name>
<from>^/api/agents/([^/]+)/force_cancel$</from>
<to last="true">/spark/api/agents/$1/force_cancel</to>
</rule>
<rule>
<name>Spark Agents API</name>
<from>^/api/agents/(.*)$</from>
<to last="true">/spark/api/agents/${escape:$1}</to>
</rule>
<rule>
<name>Access Tokens SPA</name>
<from>^/access_tokens(/?)$</from>
<to last="true">/spark/access_tokens</to>
</rule>
<rule>
<name>Kitchen Sink SPA</name>
<from>^/kitchen-sink(/?)$</from>
<to last="true">/spark/kitchen-sink</to>
</rule>
<rule>
<name>Artifact Stores SPA</name>
<from>^/admin/artifact_stores(/?)$</from>
<to last="true">/spark/admin/artifact_stores</to>
</rule>
<rule>
<name>Plugins SPA</name>
<from>^/admin/plugins(/?)$</from>
<to last="true">/spark/admin/plugins</to>
</rule>
<rule>
<name>Elastic Agent Configurations SPA Redirect</name>
<from>^/admin/elastic_profiles(/?)$</from>
<to type="temporary-redirect" last="true">/go/admin/elastic_agent_configurations</to>
</rule>
<rule>
<name>Elastic Agent Configurations SPA</name>
<from>^/admin/elastic_agent_configurations(/?)$</from>
<to last="true">/spark/admin/elastic_agent_configurations</to>
</rule>
<rule>
<name>Config Repos SPA</name>
<from>^/admin/config_repos(/?)$</from>
<to last="true">/spark/admin/config_repos</to>
</rule>
<rule>
<name>Agents SPA</name>
<from>^/agents(/?)$</from>
<to last="true">/spark/agents</to>
</rule>
<rule>
<name>Analytics SPA</name>
<from>^/analytics(/?)$</from>
<to last="true">/spark/analytics</to>
</rule>
<rule>
<name>Analytics Fetch API</name>
<from>^/analytics/([^/]+)/([^/]+)/([^/]+)</from>
<to last="true">/spark/analytics/${escape:$1}/${escape:$2}/${escape:$3}</to>
</rule>
<rule>
<name>Build Cause API</name>
<from>^/api/internal/build_cause/([^/]+)/([^/]+)</from>
<to last="true">/spark/api/internal/build_cause/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark pipeline selection internal API</name>
<from>^/api/internal/pipeline_selection(/?)$</from>
<to last="true">/spark/api/internal/pipeline_selection</to>
</rule>
<rule>
<name>Spark pipeline selection pipelines data internal API</name>
<from>^/api/internal/pipeline_selection/pipelines_data(/?)$</from>
<to last="true">/spark/api/internal/pipeline_selection/pipelines_data</to>
</rule>
<rule>
<name>Pipeline Dependency Material Autocomplete API</name>
<from>^/api/internal/dependency_material/autocomplete_suggestions(/?)$</from>
<to last="true">/spark/api/internal/dependency_material/autocomplete_suggestions</to>
</rule>
<rule>
<name>Material Search API</name>
<from>^/api/internal/material_search(/?)$</from>
<to last="true">/spark/api/internal/material_search</to>
</rule>
<rule>
<name>Spark Server Health Messages API</name>
<from>^/api/server_health_messages(/?)$</from>
<to last="true">/spark/api/server_health_messages</to>
</rule>
<rule>
<name>Server Health Status API</name>
<from>^/api/v1/health(/?)$</from>
<to last="true">/spark/api/v1/health</to>
</rule>
<rule>
<name>Spark Dashboard API</name>
<from>^/api/dashboard(/?)$</from>
<to last="true">/spark/api/dashboard</to>
</rule>
<rule>
<name>Roles Config SPA</name>
<from>^/admin/security/roles(/?)$</from>
<to last="true">/spark/admin/security/roles</to>
</rule>
<rule>
<name>System Admins(AdminsConfig) API</name>
<from>^/api/admin/security/system_admins$</from>
<to last="true">/spark/api/admin/security/system_admins</to>
</rule>
<rule>
<name>Spark Security Role Configs API Index API</name>
<from>^/api/admin/security/roles(/?)$</from>
<to last="true">/spark/api/admin/security/roles</to>
</rule>
<rule>
<name>Spark Internal Role Configs API Index API</name>
<from>^/api/admin/internal/roles(/?)$</from>
<to last="true">/spark/api/admin/internal/roles</to>
</rule>
<rule>
<name>Spark Security Role Configs API</name>
<from>^/api/admin/security/roles/(.*)$</from>
<to last="true">/spark/api/admin/security/roles/${escape:$1}</to>
</rule>
<rule>
<name>Spark Stage Operations API</name>
<from>^/api/stages/([^/]+)/([^/]+)/([^/]+)/run(/?)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/${escape:$3}/run</to>
</rule>
<rule>
<name>Spark Config Repos Operations API</name>
<from>^/api/admin/config_repo_ops/(preflight)(/?)</from>
<to last="true">/spark/api/admin/config_repo_ops/${escape:$1}</to>
</rule>
<rule>
<name>Spark Stage Instance API</name>
<condition name="Accept">application\/vnd\.go\.cd\.v1\+json</condition>
<from>^/api/stages/([^/]+)/([^/]+)/instance/([^/]+)/([^/]+)(/?)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/instance/${escape:$3}/${escape:$4}</to>
</rule>
<rule>
<name>Spark Stage Instance API V2 and latest</name>
<from>^/api/stages/([^/]+)/([^/]+)/([^/]+)/([^/]+)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/${escape:$3}/${escape:$4}</to>
</rule>
<rule>
<name>Spark Stage History Offset API</name>
<from>^/api/stages/([^/]+)/([^/]+)/history/([^/]+)(/?)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/history/${escape:$3}</to>
</rule>
<rule>
<name>Spark Stage History API</name>
<from>^/api/stages/([^/]+)/([^/]+)/history(/?)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/history</to>
</rule>
<rule>
<name>Spark Config Repos Internal Operations API</name>
<from>^/api/internal/config_repos/([^/]+)/(material_test|trigger_update|status|definitions)(/?)</from>
<to last="true">/spark/api/internal/config_repos/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark Config Repos Internal API</name>
<from>^/api/internal/config_repos(?:(/)([^/]+))?(?:/?)</from>
<to last="true">/spark/api/internal/config_repos$1${escape:$2}</to>
</rule>
<rule>
<name>Spark Config Repos Operations API</name>
<from>^/api/admin/config_repos/([^/]+)/(material_test|trigger_update|status|definitions)(/?)</from>
<to last="true">/spark/api/admin/config_repos/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark Config Repos API</name>
<from>^/api/admin/config_repos(?:(/)([^/]+))?(?:/?)</from>
<to last="true">/spark/api/admin/config_repos$1${escape:$2}</to>
</rule>
<rule>
<name>Spark Stage Operations APIs for re-rerun/cancel</name>
<from>^/api/stages/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(run-failed-jobs|run-selected-jobs|cancel)(/?)</from>
<to last="true">/spark/api/stages/${escape:$1}/${escape:$2}/${escape:$3}/${escape:$4}/${escape:$5}</to>
</rule>
<rule>
<name>Plugin Images</name>
<from>^/api/plugin_images/(.*)$</from>
<to last="true">/spark/api/plugin_images/$1</to>
</rule>
<rule>
<name>Encryption API</name>
<from>^/api/admin/encrypt(/?)$</from>
<to last="true">/spark/api/admin/encrypt</to>
</rule>
<rule>
<name>Current User API</name>
<from>^/api/current_user(/?)$</from>
<to last="true">/spark/api/current_user</to>
</rule>
<rule>
<name>Backup Index API for create</name>
<from>^/api/backups$</from>
<to last="true">/spark/api/backups</to>
</rule>
<rule>
<name>Backup API</name>
<from>^/api/backups/(.*)(/?)$</from>
<to last="true">/spark/api/backups/$1</to>
</rule>
<rule>
<name>Maintenance Mode APIs</name>
<from>^/api/admin/maintenance_mode/(.*)(/?)$</from>
<to last="true">/spark/api/admin/maintenance_mode/$1</to>
</rule>
<rule>
<name>Maintenance Mode UI</name>
<from>^/admin/maintenance_mode(/?)$</from>
<to last="true">/spark/admin/maintenance_mode</to>
</rule>
<rule>
<name>Initialize for_rails</name>
<from>.*</from>
<set name="rails_bound">false</set>
</rule>
<rule>
<name>Static content when backup in progress</name>
<note>Serve static content when backup in progress</note>
<from>^((/static/.*)|(/images/.*)|(/javascripts/.*)|(/stylesheets/.*)|(/compressed/.*))$</from>
<to last="true">$1</to>
</rule>
<rule>
<name>Spark Plugin Status Report call</name>
<from>^/admin/status_reports/(.*)$</from>
<to last="true">/spark/admin/status_reports/$1</to>
</rule>
<rule>
<name>Spark Agent Status Report call</name>
<from>^/admin/status_reports/([^/]+)/(.*)</from>
<to last="true">/spark/admin/status_reports/$1/$2</to>
</rule>
<rule>
<name>Dashboard UI</name>
<from>^/dashboard(/?)$</from>
<to last="true">/spark/dashboard</to>
</rule>
<rule>
<name>Simplified Add Pipeline Pages</name>
<from>^/admin/pipelines/(create|as-code)(/?)$</from>
<to last="true">/spark/admin/pipelines/${escape:$1}</to>
</rule>
<rule>
<name>Internal Pipelines as Code Supporting API</name>
<from>^/api/admin/internal/pac/(preview|config_files)/([^/]+)(/?)$</from>
<to last="true">/spark/api/admin/internal/pac/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Default dashboard, based on toggle</name>
<from>^/pipelines(/?)$</from>
<to last="true">/spark/dashboard</to>
</rule>
<rule>
<name>Auth Config SPA</name>
<from>^/admin/security/auth_configs(/?)$</from>
<to last="true">/spark/admin/security/auth_configs</to>
</rule>
<rule>
<name>Rails Pipeline Snippet</name>
<from>^/(admin/pipelines/snippet/.*)$</from>
<to last="true">/rails/$1</to>
</rule>
<rule>
<name>Redirect to Pipeline Config SPA</name>
<from>/admin/(pipelines|templates)/([^/]+)/(.*?)?$</from>
<to type="redirect" last="true">/go/admin/$1/${escape:$2}/edit</to>
</rule>
<rule>
<name>Rails UI</name>
<note>
Prepends 'rails/' to Rails urls, so that the request does not go through Java at all
(currently RackFilter passes a request to Rails only if Java returns a 40* HTTP response
</note>
<from>
^/((jasmine-specs)|(jasmine-specs/*)|(agents)|(agents/.*)|(agents\..*)|(environments)|(admin/environments)|(admin/environments/.*)|(admin/environments\..*)|(environments/.*)|(environments\..*)|(pipelines/.*)|(pipelines\.json)|(materials/.*)|(pipelines)|(history/.*)|(server)|(server/.*)|(admin/config/.*)|(admin/users)|(admin/users/.*)|(failures/.*)|(compare/.*)|(admin/pipelines/.*)|(admin/pipeline/.*)|(admin/templates/.*)|(admin/commands)|(admin/commands/.*)|(admin/plugins)|(admin/plugins/.*)|(admin/config_change/.*)|(admin/config_xml)|(admin/config_xml/.*)|(admin/package_repositories)|(admin/package_repositories/.*)|(config_view/.*)|(admin/package_definitions)|(admin/package_definitions/.*)|(admin/materials)|(admin/materials/.*)|(assets/.*)|(internal/pipelines/.*))$
</from>
<to last="true">/rails/$1</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Security Auth Configs API Index API</name>
<from>^/api/admin/security/auth_configs</from>
<to last="true">/spark/api/admin/security/auth_configs</to>
</rule>
<rule>
<name>Security Auth Configs API</name>
<from>^/api/admin/security/auth_configs/(.*)$</from>
<to last="true">/spark/api/admin/security/auth_configs/${escape:$1}</to>
</rule>
<rule>
<name>Security Auth Configs internal API</name>
<from>^/api/admin/internal/security/auth_configs/verify_connection$</from>
<to last="true">/spark/api/admin/internal/security/auth_configs/verify_connection</to>
</rule>
<rule>
<name>Rails API</name>
<from>^/(api/(?!admin/config).*)$</from>
<to last="true">/rails/$1</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Rails Internal API</name>
<from>^/(api/config/internal/.*)$</from>
<to last="true">/rails/$1</to>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Already rails bound</name>
<from>^/(rails/.*)$</from>
<set name="rails_bound">true</set>
</rule>
<rule>
<name>Agent files and properties</name>
<note>
For agent to download/upload artifacts and publish properties
</note>
<from>^/remoting/(files|properties)/(.*)</from>
<to last="false">/$1/$2</to>
</rule>
<!-- RESTful URLS -->
<rule>
<name>Set _method attribute to METHOD type</name>
<condition type="attribute" name="rails_bound">false</condition>
<from>.+</from>
<set name="_method">%{method}</set>
</rule>
<rule>
<name>Reset _method attribute if _method parameter is passed in</name>
<condition type="attribute" name="rails_bound">false</condition>
<condition type="parameter" name="_method">.+</condition>
<from>.+</from>
<set name="_method">%{parameter:_method}</set>
</rule>
<rule>
<condition type="request-uri">(.+)\.csv$</condition>
<from>(.+)</from>
<set name="_type">csv</set>
</rule>
<rule>
<condition type="request-uri">(.+)\.json$</condition>
<from>(.+)</from>
<set name="_type">json</set>
</rule>
<rule>
<condition type="request-uri">(.+)\.html$</condition>
<from>(.+)</from>
<set name="_type">html</set>
</rule>
<rule>
<condition type="request-uri">(.+)\.xml$</condition>
<from>(.+)</from>
<set name="_type">xml</set>
</rule>
<rule>
<condition type="request-uri">(.+)\.zip$</condition>
<from>(.+)</from>
<set name="_type">zip</set>
</rule>
<rule>
<name>RESTful Artifacts - List All builds artifacts</name>
<from>^/files/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+?)(\.(json|html))?(\?.*)?$</from>
<to type="forward">/repository/restful/artifact/%{attribute:_method}/%{attribute:_type}?pipelineName=$1&amp;pipelineCounter=$2&amp;stageName=$3&amp;stageCounter=$4&amp;buildName=$5&amp;filePath=</to>
</rule>
<rule>
<name>RESTful Artifacts with start LineNumber</name>
<condition type="parameter" name="startLineNumber"/>
<from>^/files/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*?)(\?.*)?$</from>
<to type="forward">/consoleout.json?pipelineName=$1&amp;pipelineCounter=$2&amp;stageName=$3&amp;stageCounter=$4&amp;buildName=$5&amp;filePath=${escape:$6}</to>
<set name="startLineNumber">{parameter:startLineNumber}</set>
</rule>
<rule>
<name>RESTful Artifacts with SHA1</name>
<condition type="parameter" name="sha1"/>
<from>^/files/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*?)(\?.*)?$</from>
<to type="forward">/repository/restful/artifact/%{attribute:_method}/%{attribute:_type}?pipelineName=$1&amp;pipelineCounter=$2&amp;stageName=$3&amp;stageCounter=$4&amp;buildName=$5&amp;filePath=${escape:$6}</to>
<set name="sha1">{parameter:sha1}</set>
</rule>
<rule>
<name>RESTful Artifacts</name>
<from>^/files/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/(.*?)(\?.*)?$</from>
<to type="forward">/repository/restful/artifact/%{attribute:_method}/%{attribute:_type}?pipelineName=$1&amp;pipelineCounter=$2&amp;stageName=$3&amp;stageCounter=$4&amp;buildName=$5&amp;filePath=${escape:$6}</to>
</rule>
<rule>
<name>Cruise Configuration Administration RESTful url - File</name>
<from>^/api/admin/config.xml$</from>
<to type="forward" last="true">/admin/restful/configuration/file/%{attribute:_method}/xml?version=current</to>
</rule>
<rule>
<name>Cruise Configuration Administration RESTful url - File</name>
<from>^/api/admin/config/([^/]+)\.xml$</from>
<to type="forward" last="true">/admin/restful/configuration/file/%{attribute:_method}/historical-xml?version=$1</to>
</rule>
<rule>
<name>Cruise Configuration Administration RESTful url - File</name>
<from>^/admin/configuration/file\.xml(\?.*)?$</from>
<to type="forward">/admin/restful/configuration/file/%{attribute:_method}/%{attribute:_type}</to>
</rule>
<rule>
<name>Specific Build Detail</name>
<from>/tab/build/detail/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)</from>
<to type="forward">/tab/build/recent?pipelineName=$1&amp;pipelineCounter=$2&amp;stageName=$3&amp;stageCounter=$4&amp;jobName=$5</to>
</rule>
<rule>
<name>Pipeline history page redirect to new SPA</name>
<from>/tab/pipeline/history/([^/]+)</from>
<to type="redirect" last="true">/go/pipeline/activity/$1</to>
</rule>
<rule>
<name>Stage detail beta</name>
<from>/pipelines/([^/]+)/([^/]+)/([^/]+)/([^/]+)</from>
<to type="forward">/pipelines/history?pipelineName=$1&amp;label=$2&amp;stageName=$3&amp;counter=$4</to>
</rule>
<rule>
<name>Site url API</name>
<from>^/api/admin/config/server/site_urls$</from>
<to last="true">/spark/api/admin/config/server/site_urls</to>
</rule>
</urlrewrite>

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 (.*) captures in them that need to be (.+) or something like that.

@chadlwilson chadlwilson reopened this Jun 14, 2023
@stale stale bot removed the stale label Jun 14, 2023
@chadlwilson chadlwilson added bug no stalebot Don't mark this stale. labels Jun 14, 2023
@eBeyond
Copy link

eBeyond commented Jun 15, 2023

As far as I can see it's the call to
/go/api/internal/config_repos
which leads to this message.

@chadlwilson
Copy link
Member

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 :-)

<rule>
<name>Spark Config Repos Internal Operations API</name>
<from>^/api/internal/config_repos/([^/]+)/(material_test|trigger_update|status|definitions)(/?)</from>
<to last="true">/spark/api/internal/config_repos/${escape:$1}/${escape:$2}</to>
</rule>
<rule>
<name>Spark Config Repos Internal API</name>
<from>^/api/internal/config_repos(?:(/)([^/]+))?(?:/?)</from>
<to last="true">/spark/api/internal/config_repos$1${escape:$2}</to>
</rule>

@eBeyond
Copy link

eBeyond commented Jun 15, 2023

Yes, that's the full URL (except hostname). There are no get-parameters appended to the url.
I've retried the GET on this URL several times in the browser and every time I got the log entry.

@chadlwilson
Copy link
Member

Thanks! That helps - I'll look into it.

@chadlwilson
Copy link
Member

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 "" which is the intent anyway, and why this doesn't lead to any issues - just logging noise.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug no stalebot Don't mark this stale. technical
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants