-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIAD-3252: External attachment filename containing equals sign throws exception #198
Merged
MartinWheelerMT
merged 8 commits into
main
from
niad-3252-external-attachment-equals-in-filename
Dec 13, 2024
Merged
NIAD-3252: External attachment filename containing equals sign throws exception #198
MartinWheelerMT
merged 8 commits into
main
from
niad-3252-external-attachment-equals-in-filename
Dec 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
3 times, most recently
from
December 11, 2024 16:04
6939b5d
to
d120571
Compare
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
3 times, most recently
from
December 11, 2024 16:36
70512f1
to
2e36a73
Compare
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
10 times, most recently
from
December 11, 2024 18:36
41aeef0
to
e0760f6
Compare
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
from
December 11, 2024 18:40
e0760f6
to
e1e5e37
Compare
MartinWheelerMT
changed the title
NIAD-3252: Manifest external attachment filename containing equals sign throws exception
NIAD-3252: External attachment filename containing equals sign throws exception
Dec 12, 2024
adrianclay
reviewed
Dec 12, 2024
adrianclay
reviewed
Dec 12, 2024
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
from
December 12, 2024 14:26
36395a9
to
cdc91a8
Compare
MartinWheelerMT
force-pushed
the
niad-3252-external-attachment-equals-in-filename
branch
from
December 12, 2024 14:57
181a2c5
to
6a82af3
Compare
…educe duplication. Inline xml into the above method, and remove previously added xml file. Add test to ensure that `title` is none when the description does not contain a filename. Add test to ensure that title is set to none if case-sensitive 'Filename' is not provided as a key. Add test to ensure that title is not set, but attachment is still handled when a description does not contain key value pairs. Add test to ensure that the adaptor hands duplicated `Filename` keys by using the value from the last key. Add functionality to ebxml_envelope so that a check is completed on each description variable to ensure that it is a valid key value pair (`key=value`).
adrianclay
approved these changes
Dec 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor feedback is that grouping the tests related to filenames under a common class might make it a bit more readable. May be easier to chat through my thinking though.
MartinWheelerMT
deleted the
niad-3252-external-attachment-equals-in-filename
branch
December 13, 2024 10:42
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Updated the code using the split command in
ebxml_envelope.py
so that it only splits on the first occurence of=
so that the full filename used and not attempted to be split further if it contains an=
. This was also updated to not attempt to a process a provided variable if it is not a valid key value pairHave also added tests to handle the following cases for the description:
<eb:Description>This isn't a GP2GP message</eb:Description>
<eb:Description>Filename=Value Filename=Value2</eb:Description>
filename
:<eb:Description>FILENAME=Value Filename=Value2</eb:Description>
Why
If an attachment filename contains an equals sign (such as in the example below) then a error is currently thrown. This should be handled that a filename with an equals sign does not cause an issue.
Also, from discussion, the following checks were required to make sure the adaptor throw errors in the following cases:
<eb:Description>This isn't a GP2GP message</eb:Description>
<eb:Description>Filename=Value Filename=Value2</eb:Description>
filename
:<eb:Description>FILENAME=Value Filename=Value2</eb:Description>
Type of change
Please delete options that are not relevant.
Checklist: