Menu

#1275 Enhance validation of Amazon-hosted cover scans

Approved
closed
None
5
2019-05-14
2019-05-05
Ahasuerus
No

Enhance validation of Amazon-hosted cover scans. As per Dirk Stoecker, the valid URL formats for Amazon-hosted images are:

New Amazon format:

  • /images/
  • one of P, I or G
  • 10 digits which can be letters, numbers or + and - (%2B is converted to + before)
  • optional letter L or S
  • the cropping entry
  • gif, jpg or png as extension

Old Amazon format:

  • url.../images/
  • G
  • 2 hex digits
  • 2 hex digits
  • 22 or 24 hex digits
  • .L
  • extension

The proposed regexes are:

/images/[PIG]/[0-9A-Za-z+-]{10}[LS]?(\._CR[0-9]+,[0-9]+,[0-9]+,[0-9]+)?\.(gif|png|jpg)$
and
\.images-amazon\.com/images/G/0[1-3]/ciu/[0-9a-f]{2}/[0-9a-f]{2}/[0-9a-f]{22,24}\.L\.(gif|png|jpg)$

A "diff" patch file is attached.

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2019-05-06

    Note: Somehow the mail I sent contained not the last one, but the diff which still contains the debug text: " + value.replace('%2B','+')" in the warning="" line must be removed. I though the mail program always sends the last version when I overwrite the file. Seems not.

     
  • Ahasuerus

    Ahasuerus - 2019-05-11
    • assigned_to: Ahasuerus
     
  • Ahasuerus

    Ahasuerus - 2019-05-11

    Part 1 - Cleanup report:

    edit/cleanup_report.py
    nightly/nightly_job.py
    

    Installed in SVN 413 on 2019-05-10. Keeping the FR open since we still need to enhance the post-submission warning.

     
  • Ahasuerus

    Ahasuerus - 2019-05-11
    • status: open --> closed
     
  • Ahasuerus

    Ahasuerus - 2019-05-11

    Part 2 - Post-submission warnings:

    common/viewers.py

    Installed in SVN 415 on 2019-05-11. Closing the FR.

     
  • Ahasuerus

    Ahasuerus - 2019-05-12
    • status: closed --> open-accepted
     
  • Ahasuerus

    Ahasuerus - 2019-05-12

    Re-opening the FR in order to disallow 13-character fragments in image URLs.

     
  • Ahasuerus

    Ahasuerus - 2019-05-14
    • status: open-accepted --> closed
     
  • Ahasuerus

    Ahasuerus - 2019-05-14

    Part 3 - Disallow 13-character URL fragments:

    edit/cleanup_report.py
    nightly/nightly_job.py
    

    Installed in SVN 417 on 2019-05-13. Re-closing the FR.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB