Skip to content

Conversation

KristofferFM
Copy link
Contributor

The Mimedir parser has a general flaw which is it simply ignores tokens it doesn't recognize.

As an example, the following property is invalid according to the specifications, and should be rejected by the parser.

FN;P1=value1; P2=value2:value

The problem is a whitespace in front of parameter name P2, which is not allowed according to the grammar described here . However, the current Mimedir parser do accept the line and furthermore misinterprets it to be on this format:

FN;P1=value1,value2:value

This pull request solves this specific problem by introducing the possibility to look back on the previous token parsed. Maybe it can be further improved by adding more checks. However a more general solution should possibly be preferred, I guess a complete rewrite of the parser could be the best solution.

Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.76%. Comparing base (778bb46) to head (688c165).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #727   +/-   ##
=========================================
  Coverage     98.76%   98.76%           
- Complexity     1875     1877    +2     
=========================================
  Files            71       71           
  Lines          5345     5353    +8     
=========================================
+ Hits           5279     5287    +8     
  Misses           66       66           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants