Changeset 7247 for main


Ignore:
Timestamp:
1 Dec 2011, 11:40:43 (13 years ago)
Author:
Henrik Bettermann
Message:

Do only accept jpg extensions for passport image files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r7243 r7247  
    709709    if size > MAX_UPLOAD_SIZE:
    710710        view.flash('Uploaded image is too big!')
     711        return False
     712    dummy, ext = os.path.splitext(upload.filename)
     713    ext.lower()
     714    if ext != '.jpg':
     715        view.flash('jpg file extension expected.')
    711716        return False
    712717    upload.seek(0) # file pointer moved when determining size
Note: See TracChangeset for help on using the changeset viewer.