{"record":{"id":"8d6ce5404a9cafad","repo":"epi052/feroxbuster","slug":"unable-to-parse-filename-from-url-s-path","errorCode":null,"errorMessage":"Unable to parse filename from url's path: {}","messagePattern":"Unable to parse filename from url's path: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":280,"sourceCode":"                    \"Unable to download wordlist from remote url: {source}\"\n                ))?;\n\n                if !response.status().is_success() {\n                    // status code isn't a 200, bail\n                    bail!(\n                        \"[{}] Unable to download wordlist from url: {}\",\n                        response.status().as_str(),\n                        source\n                    );\n                }\n\n                // attempt to get the filename from the url's path\n                let Some(mut path_segments) = response.url().path_segments() else {\n                    bail!(\"Unable to parse path from url: {}\", response.url());\n                };\n\n                let Some(filename) = path_segments.next_back() else {\n                    bail!(\n                        \"Unable to parse filename from url's path: {}\",\n                        response.url().path()\n                    );\n                };\n\n                let filename = filename.to_string();\n\n                // read the body and write it to disk, then read it back as a wordlist\n                let body = response.text().await?;\n                std::fs::write(&filename, body)?;\n\n                append_words_from_path(&filename, &mut words, &mut seen)?;\n            } else {\n                match append_words_from_path(source, &mut words, &mut seen) {\n                    Ok(()) => {}\n                    Err(err) => {\n                        // preserve the legacy secondary-wordlist fallback, but only when the\n                        // user is relying on a single local source (i.e. didn't supply an","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/epi052/feroxbuster/blob/1f595dab5c76858d5a14fbc47dabf2563d729c62/src/main.rs#L262-L298","documentation":"Once path_segments is obtainable, wrapped_main takes the last segment as the filename; if the final path segment is empty (e.g. URL ends with '/'), next_back() yields None and it bails with this message. The downloaded wordlist cannot be named/checked, so the scan aborts.","triggerScenarios":"--wordlist URL whose path ends with a trailing slash or whose last segment is empty, e.g. https://example.com/lists/ — path_segments().next_back() is Some(\"\") being filtered or None depending on the split, causing the bail.","commonSituations":"Directory-style raw URLs, shorteners redirecting to directory URLs, or manually typed URLs that end with '/'.","solutions":["Append a filename to the wordlist URL (remove the trailing slash and point at the actual file)","Download the file locally and pass a filesystem path","Check the final (post-redirect) URL and use it directly"],"exampleFix":"// before\n--wordlist https://example.com/lists/\n// after\n--wordlist https://example.com/lists/common.txt","handlingStrategy":"validation","validationCode":"const last = new URL(wordlistUrl).pathname.split('/').filter(Boolean).pop(); if (!last) throw new Error('URL must end with a filename, not /');","typeGuard":"function hasFilename(u) { try { return Boolean(new URL(u).pathname.split('/').filter(Boolean).pop()); } catch { return false; } }","tryCatchPattern":null,"preventionTips":["Point wordlist URLs at actual files, not directories","Strip trailing slashes from wordlist URLs","Verify the post-redirect URL ends with a filename"],"tags":["url-parsing","wordlist","filename"],"backgroundTag":"invalid-url-format","analyzedSha":"1f595dab5c76858d5a14fbc47dabf2563d729c62","analyzedAt":"2026-09-13T19:33:06.208Z","contentChangedAt":"2026-09-13T19:33:06.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}