This is an automated email from the ASF dual-hosted git repository.

mmiller pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/master by this push:
     new 2f9c72c  ACCUMULO-4756 Allow default tables validate REST (#331)
2f9c72c is described below

commit 2f9c72ceb40e9f1df5fc98a01873848a34aa2066
Author: Mike Miller <mmil...@apache.org>
AuthorDate: Wed Dec 6 16:47:13 2017 -0500

    ACCUMULO-4756 Allow default tables validate REST (#331)
---
 .../main/java/org/apache/accumulo/monitor/util/ParameterValidator.java | 2 ++
 .../src/main/java/org/apache/accumulo/monitor/view/WebViews.java       | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/ParameterValidator.java
 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/ParameterValidator.java
index a736a29..aec0826 100644
--- 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/util/ParameterValidator.java
+++ 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/util/ParameterValidator.java
@@ -22,6 +22,8 @@ package org.apache.accumulo.monitor.util;
 public interface ParameterValidator {
 
   String ALPHA_NUM_REGEX = "\\w+";
+  // Allow the special default table IDs
+  String ALPHA_NUM_REGEX_TABLE_ID = "[!+]?\\w+";
   String ALPHA_NUM_REGEX_BLANK_OK = "\\w*";
 
   String RESOURCE_REGEX = "(\\w|:)+";
diff --git 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
index 9e26a48..e242575 100644
--- 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
+++ 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/view/WebViews.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.monitor.view;
 
 import static 
org.apache.accumulo.monitor.util.ParameterValidator.ALPHA_NUM_REGEX;
 import static 
org.apache.accumulo.monitor.util.ParameterValidator.ALPHA_NUM_REGEX_BLANK_OK;
+import static 
org.apache.accumulo.monitor.util.ParameterValidator.ALPHA_NUM_REGEX_TABLE_ID;
 import static 
org.apache.accumulo.monitor.util.ParameterValidator.SERVER_REGEX_BLANK_OK;
 import static org.apache.commons.lang.StringUtils.isBlank;
 import static org.apache.commons.lang.StringUtils.isEmpty;
@@ -289,7 +290,7 @@ public class WebViews {
   @GET
   @Path("tables/{tableID}")
   @Template(name = "/default.ftl")
-  public Map<String,Object> getTables(@PathParam("tableID") @NotNull 
@Pattern(regexp = ALPHA_NUM_REGEX) String tableID) throws 
TableNotFoundException,
+  public Map<String,Object> getTables(@PathParam("tableID") @NotNull 
@Pattern(regexp = ALPHA_NUM_REGEX_TABLE_ID) String tableID) throws 
TableNotFoundException,
       UnsupportedEncodingException {
 
     String tableName = Tables.getTableName(Monitor.getContext().getInstance(), 
Table.ID.of(tableID));

-- 
To stop receiving notification emails like this one, please contact
['"commits@accumulo.apache.org" <commits@accumulo.apache.org>'].

Reply via email to