apache/gravitino

[Improvement] Use of regex on error messages can be fragile in DorisExceptionConverter.java

开放

#3,027 创建于 2024年4月19日

 (11 条评论) (0 个反应) (1 位负责人)Java (887 个派生)auto 404
good first issueimprovement

仓库指标

星标
 (3,058 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

What would you like to be improved?

DorisExceptionConverter.java uses a DATABASE_ALREADY_EXISTS_PATTERN_STRING regex to check error messages for databases that already exist. There are several issues with this and regex can be fragile expensive or even a possible DOS vector

How should we improve?

If possible improve code to not use regexp for this error condition.

贡献者指南