Bug 1033682

Summary: [new relic] URI::InvalidURIError thrown if app page requested with bad app name
Product: OpenShift Online Reporter: Jessica Forrester <jforrest>
Component: Management ConsoleAssignee: Jordan Liggitt <jliggitt>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: jliggitt, yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:34:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jessica Forrester 2013-11-22 15:34:44 UTC
Description of problem:
When hitting the application show page with an application name that has an invalid character in it like ] it will throw an InvalidURIError exception.

New Relic exception report:
https://rpm.newrelic.com/accounts/411887/applications/2116202/traced_errors/951159748?tw[end]=1385133441&tw[start]=1384874241

How reproducible:
always

Steps to Reproduce:
1. Access an app page with a URL containing the ] character, examples: 
/app/console/application/528f75c543eb830fd3000002]-php
/app/console/application/php]

Actual results:
Get the "We appear to be having technical difficulties" page

Expected results:
Get the "Application not found" page

Comment 1 Jordan Liggitt 2013-11-22 17:25:00 UTC
active resource overrides weren't url encoding path components for the model ids

Comment 2 Jordan Liggitt 2013-11-22 18:32:37 UTC
Wasn't affecting any legitimate urls for applications, lowering severity

Will merge in https://github.com/openshift/origin-server/pull/4229

Comment 3 openshift-github-bot 2013-11-22 22:14:04 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/77768e802947efb9c3d0f3e942044e801e2ece89
Fix bug 1033682 - encode model ids when generating broker urls

Comment 4 Yujie Zhang 2013-11-25 06:15:13 UTC
Tested on devenv_4067, tried to access url like the following:
https://<server>/app/console/application/5292dce5f44c159db2000005]]]]]-phpscal
https://<server>/app/console/domain/devenv54]]]]
https://<server>/app/console/application/5292dce5f44c159db2000005]]]]-phpscal/aliases
https://<server>/app/console/application/5292dce5f44c159db2000005%5D%5D%5D%5D-phpscal/alias/hhhh/edit
https://<server>/app/console/application/5292dce5f44c159db2]][[[/cartridge_type/phpmyadmin-4?direct=true
All the above urls will return "Application/Domain '' does not exist" page, but not technical error page, so verify this bug, thanks.