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: Correct XML encoding for commands. First step: createTaskCommand #39

Merged
merged 2 commits into from Aug 2, 2018

Conversation

BaaaZen
Copy link
Contributor

@BaaaZen BaaaZen commented Jun 15, 2018

The API has a serious problem with creating the commands. You always concatenate strings with the XML tags, but you never encode the values. This works as long as you don't use any XML specific characters. I got a problem when I tried to create a task with an ampersand (&) in the name. So you should always encode all inserted strings!

I fixed the problem for the "createTaskCommand" on a clean way, as I only had the problem with that command. Maybe you could fix all the other commands, too?

I'll open an issue for that.

Copy link
Contributor

@davidak davidak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have tested it and it works as before and also fixes the described issue.

@davidak
Copy link
Contributor

davidak commented Jun 18, 2018

@BaaaZen good catch. thanks for your contribution!

@janowagner janowagner requested a review from a team August 2, 2018 07:02
@codecov
Copy link

codecov bot commented Aug 2, 2018

Codecov Report

Merging #39 into master will increase coverage by 0.02%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #39      +/-   ##
=========================================
+ Coverage    5.97%   5.99%   +0.02%     
=========================================
  Files           6       6              
  Lines        1742    1751       +9     
=========================================
+ Hits          104     105       +1     
- Misses       1638    1646       +8
Impacted Files Coverage Δ
gmp/gmp.py 12.06% <9.09%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 506b649...9047b66. Read the comment docs.

@janowagner janowagner merged commit 0639534 into greenbone:master Aug 2, 2018
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.

None yet

4 participants