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

lupeng pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 2e30e523d02 HBASE-29540 Unhandled IllegalArgumentException in HBase 
Web UI When Accessing table.jsp with Invalid Table Name (#7236) (#7268)
2e30e523d02 is described below

commit 2e30e523d02940c807b4095c90376c74f81364cc
Author: wangxiangdong123 <[email protected]>
AuthorDate: Sat Sep 6 21:07:25 2025 +0800

    HBASE-29540 Unhandled IllegalArgumentException in HBase Web UI When 
Accessing table.jsp with Invalid Table Name (#7236) (#7268)
    
    Signed-off-by: Dávid Paksy <[email protected]>
    Signed-off-by: Pankaj Kumar <[email protected]>
    Signed-off-by: Nihal Jain <[email protected]>
    Signed-off-by: Peng Lu <[email protected]>
---
 .../main/resources/hbase-webapps/master/table.jsp    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp 
b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index c3669fe4abb..ea907ce8b71 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -170,6 +170,26 @@
     </div>
 <%  return;
   } %>
+  
+<%
+  // handle the case for fqtn is not null with IllegalArgumentException 
message + redirect
+  try {
+    TableName tn = TableName.valueOf(fqtn);
+    TableName.isLegalNamespaceName(tn.getNamespace());
+    TableName.isLegalTableQualifierName(tn.getQualifier());
+  } catch (IllegalArgumentException e) {
+%>
+    <div class="container-fluid content">
+      <div class="row inner_header">
+        <div class="page-header">
+          <h1>Table not legal</h1>
+        </div>
+      </div>
+      <p><hr><p>
+      <jsp:include page="redirect.jsp" />
+    </div>
+<%  return;
+  } %>
 
 <%
   final String escaped_fqtn = StringEscapeUtils.escapeHtml4(fqtn);

Reply via email to