SanitizePath removes leading '/', remove '..', '$' and '`'
(path string)
| 26 | |
| 27 | // SanitizePath removes leading '/', remove '..', '$' and '`' |
| 28 | func SanitizePath(path string) (result string) { |
| 29 | result = strings.Replace(path, "..", "", -1) |
| 30 | result = strings.Replace(result, "$", "", -1) |
| 31 | result = strings.Replace(result, "`", "", -1) |
| 32 | result = strings.TrimLeft(result, "/") |
| 33 | return |
| 34 | } |
no outgoing calls
no test coverage detected