datatracker/ietf/submit/parsers
Jennifer Richards dc14308700
refactor: Drop submission validation via libmagic (#6500)
* refactor: Update parsers/base.py for Python3

* style: Black

* refactor: Remove mime type check from FileParser

* refactor: Validate that submission is UTF-8

The mime check distinguished us-ascii from UTF-8,
but as far as I can tell the code relying on it
treated both as equally valid.

* feat: Clear error when file is not valid XML

* chore: Remove unused import

* test: Update tests to match changes

* fix: Count bytes starting from 1

* test: Add tests of FileParser validations

* fix: Fix / simplify regexp

* test: Test error caused by bad XML submission

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-10-23 10:00:04 -05:00
..
__init__.py Cutoff dates and basic checkings over the plain file. See #580 2011-02-03 11:46:04 +00:00
base.py refactor: Drop submission validation via libmagic (#6500) 2023-10-23 10:00:04 -05:00
pdf_parser.py Changed the acceptable mime type for uploaded xml files to be either text/xml or application/xml. 2016-06-06 07:38:02 +00:00
plain_parser.py refactor: Drop submission validation via libmagic (#6500) 2023-10-23 10:00:04 -05:00
tests.py refactor: Drop submission validation via libmagic (#6500) 2023-10-23 10:00:04 -05:00
xml_parser.py refactor: Drop submission validation via libmagic (#6500) 2023-10-23 10:00:04 -05:00