Skip to content

Commit 7514c91

Browse files
committed
use path.Base when parsing mbid
1 parent 2bb0b60 commit 7514c91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/wrtagweb/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"net/url"
2222
"os"
2323
"os/signal"
24+
"path"
2425
"path/filepath"
2526
"runtime"
2627
"strconv"
@@ -213,7 +214,7 @@ func main() {
213214

214215
useMBID := r.FormValue("mbid")
215216
if strings.Contains(useMBID, "/") {
216-
useMBID = filepath.Base(useMBID) // accept release URL
217+
useMBID = path.Base(useMBID) // accept release URL
217218
}
218219

219220
ctx := r.Context()
@@ -310,7 +311,7 @@ func main() {
310311
path = filepath.Clean(path)
311312
useMBID := r.FormValue("mbid")
312313
if strings.Contains(useMBID, "/") {
313-
useMBID = filepath.Base(useMBID) // accept release URL
314+
useMBID = path.Base(useMBID) // accept release URL
314315
}
315316

316317
ctx := r.Context()

0 commit comments

Comments
 (0)