Bug 1011563 - New Project dialog allows whitespaces, business-central cannot handle them
New Project dialog allows whitespaces, business-central cannot handle them
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
high Severity medium
: ER 7
: 6.0.0
Assigned To: manstis
Zuzana Krejčová
Depends On:
Blocks: 1006506
  Show dependency treegraph
Reported: 2013-09-24 10:32 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:08 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:20:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zuzana Krejčová 2013-09-24 10:32:37 EDT
Description of problem:
You can include whitespaces in the project group id, artifact id, and version. If you do, even by mistake, it lets you finish the project creation and then presents you with an error pop-up. Field with a whitespace might even be ignored (the value wouldn't be in the pom.xml, not even it's part).

'Unable to complete your request. The following exception occurred: Bad artifact coordinates grp:test2:pom: 10.0, expected format is :[:[:]]:.'

The error pop-up appears whenever you switch to the project, try to build it..

Version-Release number of selected component (if applicable):
BPMS 6.0 ER3
Comment 1 manstis 2013-09-24 14:20:47 EDT
The Maven pom XSLT just says GroupID, ArtifactID and Version are Strings. This however appears to be too relaxed. Could you please add some common-sense validation to the New Project Wizard. Thanks.
Comment 5 Mauricio Salatino 2013-10-08 11:04:07 EDT
Fixed: https://github.com/droolsjbpm/kie-wb-common/commit/4d0709c7c
Now it's checking against this regex: "^[a-zA-Z0-9\\.\\-_]+$"
Comment 6 Zuzana Krejčová 2013-12-09 11:46:21 EST
Just one minor copy&paste glitch - the version isn't matched against that regex. See GAVWizardPage.isComplete() - boolean validVersion = ... !gav.getArtifactId().matches("^[a-zA-Z0-9\\.\\-_]+$")
Comment 7 manstis 2013-12-11 17:14:26 EST
This will be addressed with https://bugzilla.redhat.com/show_bug.cgi?id=1006506

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