mirror of
https://github.com/restic/restic.git
synced 2026-12-04 15:44:46 +00:00
fix crash for parameter
This commit is contained in:
1 parent
780cb97523
commit
2f0fbaa136
1 file changed
+3
@@ -49,6 +49,9 @@ func ParseConfig(s string) (*Config, error) {
|
||||
// If the repository location cannot be parsed as a valid URL, it will be returned as is
|
||||
// (it's because this function is used for logging errors)
|
||||
func StripPassword(s string) string {
|
||||
if len(s) < 5 {
|
||||
return s
|
||||
}
|
||||
scheme := s[:5]
|
||||
s = prepareURL(s)
|
||||
|
||||
|
||||
Reference in new issue
Block a user