Learn note updatexml () MySQL explicit error injection

Source: Internet
Author: User

Before you learn, you need to know Updatexml ().

Updatexml (Xml_document, xpath_string, New_value);
The first parameter: Xml_document is a string format, the name of the XML Document object, and the doc
The second argument: Xpath_string (a string in XPath format), you can find tutorials online If you don't know the XPath syntax.
Third parameter: new_value,string format, replacing found eligible data
Action: Change the value of a node in the document that matches the criteria

And then we'll look at the statement:

http://www. xxxiii.com/a.php?id=1 and Updatexml (1, concat (0x7e, (  SELECT@ @version),0x7e),1)

CONCAT (STR1,STR2,...)

Returns the string that results from the connection parameter. If any one of the arguments is NULL, the return value is null.

Returns the version by querying @ @version. The concat then strings it. Because the Updatexml second parameter requires an XPath-formatted string, it does not meet the requirements, and then an error is given.

The error will probably be:

1105 (HY000): XPATH syntax error: ': root@localhost'

The string that does not understand the XPath format comes here: http://www.cnblogs.com/Loofah/archive/2012/05/10/2494036.html

Learn note updatexml () MySQL explicit error injection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.