Bug 8795 - submission time file name validation
: submission time file name validation
Status: VERIFIED FIXED
Product: sourcejuicer
review-tool
: unspecified
: ANY/Generic All
: P1 blocker
: ---
Assigned To: Luis de Bethencourt
: qa-sourcejuicer-review-tool
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-05-08 03:19 UTC by Kevin McAreavey
Modified: 2009-05-13 08:19 UTC (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Kevin McAreavey 2009-05-08 03:19:20 UTC
Filenames should be validated at time of submission and re-submission
Comment 1 Kevin McAreavey 2009-05-08 06:41:32 UTC
SourceJuicer 1.2_01

Submit a spec, copyright and patch file with the patch file incorrectly named
Select Return to SourceJuicer home

Expected result:
Error message for incorrectly named patch file
Returns to SourceJuicer home
Review thread not created

Actual result:
Error message for incorrectly named patch file
Django error 'MultiValueDictKeyError at /submit/'
Review thread created with spec and copyright but not patch

Django traceback:
Environment:

Request Method: POST
Request URL: http://red226.ireland.sun.com/submit/
Django Version: 1.0.2 final
Python Version: 2.4.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'dtip.build',
 'dtip.pkgentry',
 'django_evolution',
 'django.contrib.comments']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'dtip.common.locking_middleware.LockingMiddleware',
 'django.middleware.transaction.TransactionMiddleware')


Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in
get_response
  86.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/opt/SUNWdtip/dtip/pkgentry/submit.py" in submit
  125.       if form_data['identifier'] == '':
File "/usr/lib/python2.4/site-packages/django/utils/datastructures.py" in
__getitem__
  203.             raise MultiValueDictKeyError, "Key %r not found in %r" %
(key, self)

Exception Type: MultiValueDictKeyError at /submit/
Exception Value: "Key 'identifier' not found in <QueryDict: {}>"
Comment 2 Luis de Bethencourt 2009-05-13 04:07:47 UTC
file naming validation in its own function check if spec and copyright have
been submitted
first grab package name then compare to file names
spec files starting with SUNW are not allowed

(pending) check submission files arent already in SVN