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

API: prevent the API returning not well-formed XML #12090

Closed
ghimf opened this issue Sep 21, 2017 · 7 comments · Fixed by #12247
Closed

API: prevent the API returning not well-formed XML #12090

ghimf opened this issue Sep 21, 2017 · 7 comments · Fixed by #12247
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@ghimf
Copy link

ghimf commented Sep 21, 2017

Since 3.1.0, the result/visitedPages/row elements, when the visited url contains the '=' character, instead of the expected:
<visitedPages><row key="http://example.org/homepage?param1=value1&param2=value2">1</row></visitedPages>
it returns:
<visitedPages><row http://example.org/homepage?param1="value1&param2=value2">1</row></visitedPages>

@mattab
Copy link
Member

mattab commented Sep 21, 2017

Hi @ghimf

Thanks for the report. Can you please send the URL used to generate this API output?

Looking forward to fixing this issue

@mattab mattab added this to the 3.1.2 milestone Sep 21, 2017
@mattab mattab added the Regression Indicates a feature used to work in a certain way but it no longer does even though it should. label Sep 21, 2017
@ghimf
Copy link
Author

ghimf commented Sep 21, 2017

http://demo.piwik.org/?module=API&method=Live.getVisitorProfile&idSite=7&visitorId=VID&format=xml&token_auth=TAU
with valid VID and TAU values

@mattab
Copy link
Member

mattab commented Sep 22, 2017

@sgiehl re-opening because:

  • our automated tests do not show this actual bug. We need to have at least one test which shows the XML problem
  • to prevent the issue of invalid XML returned by API, we also need to add some test that ensures that all XML files are valid XML

@mattab mattab reopened this Sep 22, 2017
@mattab mattab changed the title API: Not well-formed XML returned by Live.getVisitorProfile API: prevent the API returning not well-formed XML Sep 25, 2017
@mattab mattab added the c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. label Sep 25, 2017
@mattab mattab modified the milestones: 3.1.2, 3.2.0 Sep 25, 2017
@ghimf
Copy link
Author

ghimf commented Oct 12, 2017

Hello,

With the same URL as above
http://demo.piwik.org/?module=API&method=Live.getVisitorProfile&idSite=7&visitorId=VID&format=xml&token_auth=TAU
when the VID visitor used a "Portable media player" device, the result/devices element contains a not well-formed element named <Portable media player></Portable media player>.

Regards.

@mattab
Copy link
Member

mattab commented Oct 13, 2017

thanks for letting us know @ghimf

@sgiehl
Copy link
Member

sgiehl commented Oct 13, 2017

Good point. I'll change that.

@mattab mattab added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label Oct 16, 2017
@mattab mattab modified the milestones: 3.3.0, 3.2.1 Oct 16, 2017
@mattab
Copy link
Member

mattab commented Oct 16, 2017

Last remaining task AFAIK before closing issue:

  • to prevent the issue of invalid XML returned by API, we also need to add some test that ensures that all XML files are valid XML

@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants