Skip to content
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

Fix handling of whitespaces in common_set_list function #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okraits
Copy link
Contributor

@okraits okraits commented Sep 12, 2016

If the payload contains whitespaces (for example openvpn remote parameter),
the common_set_list function splits the payload at these whitespaces. This
commit fixes this issue.

@pivasoftware
Copy link
Owner

the common_set_list is not used yet in the current version of easycwmp data model. But it could be used in the future, and you are right if the list contains a value that contains spaces then it will be treated in wrong way. But your suggestion does not meet the issue, I really do not understand how your modif can fix the issue, please review your suggestion

@okraits
Copy link
Contributor Author

okraits commented Jan 19, 2018

The fix changes the internal field separator to ,, iterates over the string parts and restores the previous separator value (probably whitespace) afterwards.
See https://gist.github.com/okraits/3e0a14827a619b4f85dcc27cb1df32b1 for a test of the fix.

If the payload contains whitespaces (for example openvpn remote parameter),
the common_set_list function splits the payload at these whitespaces. This
commit fixes this issue.
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