Skip to content

search: fix panic in globToRegex when input string has trailing backslash

Administrator requested to merge sh/12456-glob-panic into master

Created by: stefanhengl

Fixes #12456

func globToRegex did not handle a trailing backslash and for inputs like "anything\" it panicked with index out of range. This PR fixes the issue. In the case of trailing backslashes, globToRegex now returns a proper error that is handled by the caller.

image

Merge request reports

Loading