The foldLine utility method contains regular expressions which are vulnerable to catastrophic backtracking.
Preferred solution would be to come up with regex which isn't vulnerable as this would be a patch release. But a refactor using String.lastIndexOf() with a smaller list of folding characters (space, dash, dot,...) might be the only valid solution. This would however require it to be a minor release.
The
foldLine
utility method contains regular expressions which are vulnerable to catastrophic backtracking.Preferred solution would be to come up with regex which isn't vulnerable as this would be a patch release. But a refactor using
String.lastIndexOf()
with a smaller list of folding characters (space, dash, dot,...) might be the only valid solution. This would however require it to be a minor release.Thanks to @davisjam.