You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cause of this bug is within method mpgResponse::characterHandler($parser, $data)
Due to '&' as an special XML entity character, the 'data node':
https://host/path?item1=1&item2=2
is tokenized into 3 separate fields:
https://host/path?item1=1
&
item2=2
It means mpgResponse::characterHandler would be invoked three times by php xml parser although the currentTag remain unchanged across these 3 times function calls.
Near the end of mpgResponse::characterHandler, there is a statement
$this->responseData[$this->currentTag] = $data;
So, the later tokenized string will overwrite the previous one. This explain the bug.
In fact, all 5 special xml entity characters will cause this bug.
Thus, I propose to concatenate the tokenized data string instead
$this->responseData[$this->currentTag] .= $data;
The text was updated successfully, but these errors were encountered:
@MonerisSolutions
I find a critical bug within mpgResponse class.
The XML parser "failed" on identifying special XML entity character '&'. For example, we expect
to be parsed as:
However, the actual outcome is:
The cause of this bug is within method
mpgResponse::characterHandler($parser, $data)
Due to '&' as an special XML entity character, the 'data node':
is tokenized into 3 separate fields:
It means mpgResponse::characterHandler would be invoked three times by php xml parser although the currentTag remain unchanged across these 3 times function calls.
Near the end of mpgResponse::characterHandler, there is a statement
So, the later tokenized string will overwrite the previous one. This explain the bug.
In fact, all 5 special xml entity characters will cause this bug.
Thus, I propose to concatenate the tokenized data string instead
The text was updated successfully, but these errors were encountered: