Bug 1098394 - No url validation on project homepage field
Summary: No url validation on project homepage field
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: development
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.5
Assignee: Alex Eng
QA Contact: Zanata-QA Mailling List
Depends On:
TreeView+ depends on / blocked
Reported: 2014-05-16 04:19 UTC by Damian Jansen
Modified: 2015-01-26 23:28 UTC (History)
2 users (show)

Fixed In Version: 3.4.0-SNAPSHOT (git-server-3.3.2-351-g3bcc0ee)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-01-26 23:28:00 UTC

Attachments (Terms of Use)

Description Damian Jansen 2014-05-16 04:19:49 UTC
Description of problem:
There is no validation on the homepage field, under project general settings. Text that is entered here, not in the form of a url, will either render as appended to the current url or a seam.framework.EntityNotFoundException

Version-Release number of selected component (if applicable):

How reproducible:
Easy always

Steps to Reproduce:
1. go to a project maintained by $currentuser
2. go to settings, enter in blahblahblah as the Home Page. Press Update.
3. Click on the link at the top left

Actual results:
Zanata append the text to the current url, which is then altered back to /versions

Expected results:
Validation shouldn't allow this

Additional info:
If something like <a href="ftp://meowmowowwoof">Meowwoof</a> is entered, it results in an Exception
14:14:37,954 WARN  [org.jboss.seam.exception.Exceptions] (http-/ handled and logged exception: javax.el.ELException: org.jboss.seam.framework.EntityNotFoundException: entity not found: org.zanata.model.HProject#<a href="ftp:
	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:339) [jboss-el-1.0_02.CR6.jar:1.0_02.CR6]
	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:348) [jboss-el-1.0_02.CR6.jar:1.0_02.CR6]
	at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58) [jboss-el-1.0_02.CR6.jar:1.0_02.CR6]
	at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) [jboss-el-1.0_02.CR6.jar:1.0_02.CR6]
	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jboss-el-1.0_02.CR6.jar:1.0_02.CR6]
	at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:222) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.navigation.Page.preRender(Page.java:311) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.navigation.Pages.preRender(Pages.java:351) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:565) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]

Comment 1 Alex Eng 2014-05-16 04:58:03 UTC
Pull request:

Add URL validation to the input field, new tab/windows when clicked on url

Comment 2 Ding-Yi Chen 2014-05-19 23:53:43 UTC
Zanata 3.4.0-SNAPSHOT (git-server-3.3.2-351-g3bcc0ee)

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