apache/gravitino
View on GitHub[Improvement] Use of regex on error messages can be fragile in DorisExceptionConverter.java
Open
#3,027 opened on Apr 19, 2024
good first issueimprovement
Repository metrics
- Stars
- (3,058 stars)
- PR merge metrics
- (PR metrics pending)
Description
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.