{"record":{"id":"455a6e4e3250f0f8","repo":"projectdiscovery/nuclei","slug":"smb-url-missing-share-name","errorCode":null,"errorMessage":"smb url missing share name","messagePattern":"smb url missing share name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/file/smb_path.go","lineNumber":135,"sourceCode":"\tshare := cleaned[1]\n\trel := \".\"\n\tif len(cleaned) > 2 {\n\t\trel = strings.Join(cleaned[2:], \"/\")\n\t}\n\tif err := smbsession.RequireShareName(share); err != nil {\n\t\treturn nil, err\n\t}\n\tnormalized, err := smbsession.NormalizeSharePath(rel)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &SMBTarget{Host: host, Port: 445, Share: share, Path: normalized}, nil\n}\n\nfunc splitSharePath(urlPath string) (share, rel string, err error) {\n\turlPath = strings.Trim(urlPath, \"/\")\n\tif urlPath == \"\" {\n\t\treturn \"\", \"\", fmt.Errorf(\"smb url missing share name\")\n\t}\n\tparts := strings.SplitN(urlPath, \"/\", 2)\n\tshare = parts[0]\n\tif err := smbsession.RequireShareName(share); err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\trel = \".\"\n\tif len(parts) == 2 {\n\t\trel = parts[1]\n\t}\n\tnormalized, err := smbsession.NormalizeSharePath(rel)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\treturn share, normalized, nil\n}\n\n// Display returns a stable UNC-like string for events/logs (never embeds password).","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/file/smb_path.go#L117-L153","documentation":"Error \"smb url missing share name\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/protocols/file/smb_path.go:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}