Bug 1378716 - Invalid url can be saved by editing bc page
Summary: Invalid url can be saved by editing bc page
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-23 08:05 UTC by Yanping Zhang
Modified: 2016-09-27 11:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-26 13:18:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
invalidurl.gif (995.99 KB, image/gif)
2016-09-23 08:05 UTC, Yanping Zhang
no flags Details

Description Yanping Zhang 2016-09-23 08:05:06 UTC
Created attachment 1204027 [details]
invalidurl.gif

Description of problem:
When edit bc page, try to update "Source Repository URL" with an invalid url, click "Save" button, it saved successfully, and no errors show up.

Version-Release number of selected component (if applicable):
openshift v1.4.0-alpha.0+8134786-dirty
kubernetes v1.4.0-beta.3+d19513f
etcd 3.0.9

How reproducible:
Always

Steps to Reproduce:
1.Create app from template: https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
2.Access bc edit page, update "Source Repository URL" from "https://github.com/openshift/ruby-hello-world.git" to "@%cccccc", then click "Save".

Actual results:
2.Could save successfully, and the Source repo in bc configuration page became "@%cccccc"

Expected results:
2.The "Save" button should be disabled when url is invalid, or should not save successfully and error info is needed.

Additional info:
Try to update the url in cli with "@%cccccc", could not update.

Comment 1 Samuel Padgett 2016-09-26 12:00:48 UTC
Do you see a warning message? We don't disable the save button in this case on purpose, but you should see a warning.

We've had cases in the past where the regex was wrong, and we don't want to block submit. One example: https://github.com/openshift/origin/issues/2730

Comment 2 Samuel Padgett 2016-09-26 12:03:26 UTC
This is the PR that relaxed validation for the "Add to Project" page:

https://github.com/openshift/origin/pull/2758

Comment 3 Jakub Hadvig 2016-09-26 13:18:07 UTC
Closing this one after chat with Sam. Not a bug

Comment 4 Yanping Zhang 2016-09-27 09:02:17 UTC
(In reply to Samuel Padgett from comment #1)
> Do you see a warning message? We don't disable the save button in this case
> on purpose, but you should see a warning.
> 
> We've had cases in the past where the regex was wrong, and we don't want to
> block submit. One example: https://github.com/openshift/origin/issues/2730

Do you mean this message "Git repository should be a URL."under the editor box when input "@%cccccc"? Could see it when the url string conatins "@".
But it inputs string "$$$$" or "#####", there is no this message and could save successfully. Is this also by design?

Comment 5 Samuel Padgett 2016-09-27 10:52:14 UTC
Some of those are a problem, but we have another bug tracking that https://bugzilla.redhat.com/show_bug.cgi?id=1225420

Comment 6 Yanping Zhang 2016-09-27 11:03:12 UTC
Samuel, Got it, thanks to confirm!


Note You need to log in before you can comment on or make changes to this bug.