Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: empty u.path, cause 'panic: runtime error: slice bounds out of r… #663

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
return path, query, trackID, nil
}

if u.Path == "" {
return "", "", "", liberrors.ErrServerPathNoSlash{}

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test_highlevel

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.21)

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.22)

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.23)

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / golangci-lint

undefined: liberrors.ErrServerPathNoSlash) (typecheck)

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.21)

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test_highlevel

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.22)

undefined: liberrors.ErrServerPathNoSlash

Check failure on line 75 in server_session.go

View workflow job for this annotation

GitHub Actions / test (1.23)

undefined: liberrors.ErrServerPathNoSlash
}

// no track ID and a trailing slash.
// this happens when trying to read a MPEG-TS stream with FFmpeg.
if strings.HasSuffix(u.RawQuery, "/") {
Expand Down
Loading