Skip to content

Commit

Permalink
Allow : in URLs. Fix SysConfig id validation pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
sprevilla committed Feb 22, 2019
1 parent 3e60eeb commit 80edd2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/qi-core/src/main/java/org/jpos/qi/QINavigator.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import java.util.regex.Pattern;

public class QINavigator extends Navigator {
private static String URL_PATTERN_STRING = "^[\\w\\s.\\-\\/\\?\\=]{0,255}$";
private static String URL_PATTERN_STRING = "^[\\w\\s.\\-\\/\\?\\=\\:]{0,255}$";
private static Pattern ROUTE_PATTERN = Pattern.compile("^\\/(\\w+)\\/*.*");
public Validator validator;
QI app;
Expand Down
5 changes: 3 additions & 2 deletions modules/testbed/src/dist/deploy/00_qi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<!ENTITY TEXT_EXTENDED_PATTERN "^[\w\s.,\-\'():]*$">
<!ENTITY WORD_PATTERN "^[\w.\-]*$">
<!ENTITY ACCT_CODE_PATTERN "^[\w.]*$">
<!ENTITY SYSCONFIG_ID_PATTERN "^[\w\s.\-\/\?\=\:]{0,255}$">
]>

<xml-config name="QI" logger="Q2">
Expand Down Expand Up @@ -64,7 +65,7 @@
</view>
<view route="sysconfig" class="org.jpos.qi.sysconfig.SysConfigView" perm="sysconfig" sidebar="system">
<property name="entityName" value="sysconfig"/>
<attribute name="id" required="true" read-only="true" regex="&WORD_PATTERN;" length="64" expand-ratio="1" />
<attribute name="id" required="true" read-only="true" regex="&SYSCONFIG_ID_PATTERN;" length="64" expand-ratio="1" />
<attribute name="value" regex="&TEXT_PATTERN;" required="true" expand-ratio="4"/>
</view>
<!--<view route="permissions" class="org.jpos.qi.sysconfig.PermissionView" perm="sysadmin" sidebar="system">-->
Expand All @@ -77,7 +78,7 @@
<property name="entityName" value="permission"/>
<property name="prefix" value="perm." />
<property name="title" value="Permissions" />
<attribute name="id" required="true" read-only="true" regex="&WORD_PATTERN;" length="64" expand-ratio="1" />
<attribute name="id" required="true" read-only="true" regex="&SYSCONFIG_ID_PATTERN;" length="64" expand-ratio="1" />
<attribute name="value" regex="&TEXT_PATTERN;" required="true" expand-ratio="4"/>
</view>

Expand Down

0 comments on commit 80edd2c

Please # to comment.