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

Fixed to validate attributes before inserting into XML. #339

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

hsong-rh
Copy link
Contributor

@hsong-rh hsong-rh commented Mar 9, 2018

Filter out the unrecognized characters in attributes before inserting into XML.

https://bugzilla.redhat.com/show_bug.cgi?id=1533843

@hsong-rh
Copy link
Contributor Author

hsong-rh commented Mar 9, 2018

@roliveri @jerryk55 Please review.

@miq-bot
Copy link
Member

miq-bot commented Mar 9, 2018

Checked commit hsong-rh@5aa3f3d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@jerryk55
Copy link
Member

jerryk55 commented Mar 9, 2018

@hsong-rh this looks good as far as it goes. However my question would be - are there other places in this class where we are assuming valid character encoding that might also be a problem? ".to_s" is used in several places here - what would happen if any of those objects were also in a non-valid encoding?

@hsong-rh
Copy link
Contributor Author

hsong-rh commented Mar 9, 2018

@jerryk55, we already have a fix for elements adding, here we do the same thing for attributes. These should cover the most cases.

@roliveri roliveri merged commit 21bbb2d into ManageIQ:master Mar 9, 2018
@roliveri roliveri added this to the Sprint 81 Ending Mar 12, 2018 milestone Mar 9, 2018
simaishi pushed a commit that referenced this pull request Mar 12, 2018
Fixed to validate attributes before inserting into XML.
(cherry picked from commit 21bbb2d)

https://bugzilla.redhat.com/show_bug.cgi?id=1554343
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit b40252a6aadcfafd02ad0aa160a1e327de2b174d
Author: Richard Oliveri <oliveri.richard.github@gmail.com>
Date:   Fri Mar 9 11:40:46 2018 -0500

    Merge pull request #339 from hsong-rh/validate_xml_attributes
    
    Fixed to validate attributes before inserting into XML.
    (cherry picked from commit 21bbb2d2372af8aaf4c733868c0f51da53cdb8e7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1554343

simaishi pushed a commit that referenced this pull request Mar 12, 2018
Fixed to validate attributes before inserting into XML.
(cherry picked from commit 21bbb2d)

https://bugzilla.redhat.com/show_bug.cgi?id=1554344
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit aaaf801c6c008360d6ff59ffa4005152678f45a1
Author: Richard Oliveri <oliveri.richard.github@gmail.com>
Date:   Fri Mar 9 11:40:46 2018 -0500

    Merge pull request #339 from hsong-rh/validate_xml_attributes
    
    Fixed to validate attributes before inserting into XML.
    (cherry picked from commit 21bbb2d2372af8aaf4c733868c0f51da53cdb8e7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1554344

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

Successfully merging this pull request may close these issues.

None yet

5 participants