Opened 8 years ago

Closed 8 years ago

#5619 closed Bug (fixed)

Invalid magnet link gives no error dialog.

Reported by: dale2507 Owned by: jordan
Priority: Normal Milestone: 2.83
Component: Web Client Version: 2.82
Severity: Normal Keywords: webui magnet link error handling
Cc:

Description

When an invalid magnet url is given in the upload torrent files dialog in the web ui, no error message is displayed due to an javascript error.

File: transmission.js Line: 967 - 970

remote.sendRequest (o, function(response) {
        if (response.result != 'success')
                alert ('Error adding "' + file.name + '": ' + response.result);
});

The javascript error is caused because the file variable is undefined as there was no file attached. The full javascript error is:

Uncaught TypeError: Cannot read property 'name' of undefined transmission.js:969
  (anonymous function) transmission.js:969
  o jquery.min.js:2
  p.fireWith jquery.min.js:2
  w jquery.min.js:4
  send.d

Attachments (1)

5619.diff (436 bytes) - added by wardogy 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by wardogy

comment:1 Changed 8 years ago by jordan

  • Milestone changed from None Set to 2.83
  • Owner set to jordan
  • Status changed from new to assigned

Yep, looks like file.name got incompletely refactored out at some point. Thanks for the report and the fix :)

comment:2 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Patch applied in r14257.

Note: See TracTickets for help on using tickets.