Bug 1011563 - New Project dialog allows whitespaces, business-central cannot handle them
Summary: New Project dialog allows whitespaces, business-central cannot handle them
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER 7
: 6.0.0
Assignee: manstis
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks: 1006506
TreeView+ depends on / blocked
 
Reported: 2013-09-24 14:32 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:20:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1006506 0 high CLOSED File name validation broken 2021-02-22 00:41:40 UTC

Internal Links: 1006506

Description Zuzana Krejčová 2013-09-24 14:32:37 UTC
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 18:20:47 UTC
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 15:04:07 UTC
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 16:46:21 UTC
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 22:14:26 UTC
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.