apache/gravitino

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

Aperta

#3027 aperta il 19 apr 2024

 (11 commenti) (0 reazioni) (1 assegnatario)Java (887 fork)auto 404
good first issueimprovement

Metriche repository

Star
 (3058 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor