mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
+2
-1
@@ -131,10 +131,11 @@ func setupOptionalAssetUpload(opts *runner.Options) *pdcp.UploadWriter {
|
||||
opts.OnClose = func() {
|
||||
writer.Close()
|
||||
}
|
||||
|
||||
// add additional metadata
|
||||
if opts.AssetID != "" {
|
||||
// silently ignore
|
||||
_ = writer.SetAssetID(opts.AssetID)
|
||||
writer.SetAssetID(opts.AssetID)
|
||||
}
|
||||
if opts.AssetName != "" {
|
||||
// silently ignore
|
||||
|
||||
@@ -99,12 +99,11 @@ func (u *UploadWriter) GetWriterCallback() runner.OnResultCallback {
|
||||
}
|
||||
|
||||
// SetAssetID sets the scan id for the upload writer
|
||||
func (u *UploadWriter) SetAssetID(id string) error {
|
||||
func (u *UploadWriter) SetAssetID(id string) {
|
||||
if !xidRegex.MatchString(id) {
|
||||
return fmt.Errorf("invalid asset id provided")
|
||||
gologger.Warning().Msgf("invalid asset id provided (unknown xid format): %s", id)
|
||||
}
|
||||
u.assetGroupID = id
|
||||
return nil
|
||||
}
|
||||
|
||||
// SetAssetGroupName sets the scan name for the upload writer
|
||||
|
||||
Reference in New Issue
Block a user