{"record":{"id":"6e6a4b96ce48db73","repo":"AlexxIT/go2rtc","slug":"wrong-url","errorCode":null,"errorMessage":"wrong URL: ","messagePattern":"wrong URL: ","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/webtorrent/init.go","lineNumber":167,"sourceCode":"\t\t\tsrv.RemoveShare(share)\n\t\t\tdelete(shares, src)\n\t\t} else {\n\t\t\thttp.Error(w, \"\", http.StatusNotFound)\n\t\t}\n\t}\n}\n\nfunc streamHandle(rawURL string) (core.Producer, error) {\n\tu, err := url.Parse(rawURL)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tquery := u.Query()\n\tshare := query.Get(\"share\")\n\tpwd := query.Get(\"pwd\")\n\tif len(share) < 8 || len(pwd) < 4 {\n\t\treturn nil, errors.New(\"wrong URL: \" + rawURL)\n\t}\n\n\tpc, err := webrtc.PeerConnection(true)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn webtorrent.NewClient(srv.URL, share, pwd, pc)\n}\n","sourceCodeStart":149,"sourceCodeEnd":177,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/webtorrent/init.go#L149-L177","documentation":"Webtorrent streamHandle's URL-shape guard: the parsed query string's 'share' parameter is shorter than 8 chars or 'pwd' shorter than 4. These are the minimum lengths for a usable webtorrent share ID and password, so the URL is treated as malformed and rejected before any peer connection is made.","triggerScenarios":"Thrown at internal/webtorrent/init.go:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the webtorrent://...?share=...&pwd=... URL to include full-length share and password values","Copy the share link verbatim from the source that generated it","Validate share/pwd lengths client-side before configuring the source"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}