If a user tries to upload a file that they have listing access but no read access, a comprehensible error message should be produced instead of an oops code

Bug #2060540 reported by Erkin Alp Güney
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Confirmed
Low
Unassigned

Bug Description

When I try to upload attachment to a bug report, the "upload" button fails to respond.

Tags: lp-bugs
tags: added: bugtrackers
Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

When I click the upload button, no network request is performed.

information type: Public → Public Security
Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

This time, network request happened but I got OOPS-41394e3f2796eee02a69f4d9d1569db1

Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

OOPS-d34f943a7aa11f6edca709dedee36b0c too

Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

OOPS-3b593020adcc219a9afad4a1e8b5f815 too

Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

OOPS-bc1afdf8b0676aca18c70109af82356d too

Changed in launchpad:
status: New → Confirmed
Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

 OOPS-889f262e4c4f3496712c77ad1dfe3da9 too

tags: added: lp-bugs
removed: bugtrackers
summary: - Attachment upload not working
+ If the user has permission to list but not read the file, the upload
+ system doesn't handle the case well
Revision history for this message
Ines Almeida (ines-almeida) wrote : Re: If the user has permission to list but not read the file, the upload system doesn't handle the case well

> If the user has permission to list but not read the file

Does this mean you are trying to upload a file that you don't have read access to?

If that is the case, it seems to me that we should for sure show a better error message for this particular case, but I would say that that's expected behavior.

For future reference, the oopses seem always the same:
```
  IndexError: list index out of range

    Traceback (most recent call last):
  Module zope.publisher.publish, line 139, in publish
    request.processInputs()
  Module zope.publisher.browser, line 346, in processInputs
    forms, files = multipart.parse_form_data(
  Module multipart, line 501, in parse_form_data
    for part in MultipartParser(stream, boundary, content_length, **kwargs):
  Module multipart, line 212, in __iter__
    for part in self._part_iter:
  Module multipart, line 281, in _iterparse
    for line, nl in lines:
  Module multipart, line 246, in _lineiter
    len_first_line = len(lines[0])
IndexError: list index out of range
```

Changed in launchpad:
importance: Undecided → Low
Revision history for this message
Erkin Alp Güney (erkinalp9035) wrote :

> Does this mean you are trying to upload a file that you don't have read access to?

Yes, that.

summary: - If the user has permission to list but not read the file, the upload
- system doesn't handle the case well
+ If a user tries to upload a file that they have listing access but no
+ read access, a comprehensible error message should be produced instead
+ of an oops code
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.