apache/gravitino

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

オープン

#3,027 opened on 2024/04/19

 (11 件のコメント) (0 件のリアクション) (1 人の担当者)Java (887 件のフォーク)auto 404
good first issueimprovement

Repository metrics

Stars
 (3,058 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド