MYSQL updatexml error injection, mysqlupdatexml

Source: Internet
Author: User

MYSQL updatexml error injection, mysqlupdatexml

First, understand the updatexml () function.

UPDATEXML (XML_document, XPath_string, new_value );
The first parameter: XML_document is in String format and is the name of the XML document object. The parameter is Doc.
The second parameter is XPath_string (a string in the Xpath format). If you do not know the Xpath syntax, you can find the tutorial online.
The third parameter: new_value, String format, replace the searched data that meets the condition
Purpose: change the value of a qualified node in the document.

Change the XPATH_string value in XML_document

Our injection statement is:

Updatexml (1, concat (0x7e, (SELECT @ version), 0x7e), 1)
The concat () function is used to concatenate a string. Therefore, it does not conform to the XPATH_string format, resulting in a format error.
ERROR 1105 (HY000): XPATH syntax error: ': root @ localhost'

XPATH format: http://www.cnblogs.com/Loofah/archive/2012/05/10/2494036.html

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.