This is an automated email from the ASF dual-hosted git repository.
lupeng pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new f678563dd8f HBASE-29540 Unhandled IllegalArgumentException in HBase
Web UI When Accessing table.jsp with Invalid Table Name (#7236)
f678563dd8f is described below
commit f678563dd8f25281bbba75263460b7ae06ca5097
Author: wangxiangdong123 <[email protected]>
AuthorDate: Sun Aug 31 17:37:22 2025 +0800
HBASE-29540 Unhandled IllegalArgumentException in HBase Web UI When
Accessing table.jsp with Invalid Table Name (#7236)
Signed-off-by: Dávid Paksy <[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 73b6057a975..f55d1dd8170 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 @@
<% 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);
Table table = master.getConnection().getTable(TableName.valueOf(fqtn));