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 合併指標
 (平均合併 6天 6小時) (30 天內合併 148 個 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.

貢獻者指南