Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

XML I10-003 Exam - Topic 5 Question 80 Discussion

See separate window.A certain Web application displays user information according to user input via Web browser. The XML data managing user information is as shown in [example.xml] (separate window). The following [XQuery] is executed when the Web application retrieves user information from [example xml].[XQuery]{fn:doc("example.xml")//data[userid = "(1)"][password = "(2)"]}At this time, the Web application completes the [XQuery] by replacing (1) and (2) with the user input character string, and executes the query.No character escapes (e.g. convert "
B) (1) ' or''=' (2) ' or''=' and F) (1) 'or fn:true() or any=' (2) 'or fn:true() or any='
A) (1) ' or''=' (2) OK
C) (1) idorfn:true() (2) OK
D) (1) idorfn.true() (2) idorfn:true()
E) (1) ' or fn:true() or any=' (2) OK

XML I10-003 Exam - Topic 5 Question 80 Discussion

Actual exam question for XML's I10-003 exam
Question #: 80
Topic #: 5
[All I10-003 Questions]

See separate window.

A certain Web application displays user information according to user input via Web browser. The XML data managing user information is as shown in [example.xml] (separate window). The following [XQuery] is executed when the Web application retrieves user information from [example xml].

[XQuery]

{

fn:doc("example.xml")//data[userid = "(1)"][password = "(2)"]

}

At this time, the Web application completes the [XQuery] by replacing (1) and (2) with the user input character string, and executes the query.

No character escapes (e.g. convert "<" to "<") are performed for character string input by the user. Select two of the following that produces the query execution result in [Execution Result] (separate window) when the character string is as shown in each answer choice.

Show Suggested Answer Hide Answer
Suggested Answer: B, F

Contribute your Thoughts:

0/2000 characters
Colette
4 days ago
I’m leaning towards E.
upvoted 0 times
...
Corinne
9 days ago
A makes sense, but B looks good too.
upvoted 0 times
...
Leanna
15 days ago
I think option A could work.
upvoted 0 times
...
Corinne
20 days ago
I feel the same.
upvoted 0 times
...
Leanna
25 days ago
This question is tricky!
upvoted 0 times
...
Gladis
1 month ago
I think E is also a valid option, right?
upvoted 0 times
...
Dyan
1 month ago
C and D won't work, they don't match the expected format.
upvoted 0 times
...
Belen
1 month ago
Wait, can you really use "or""=" like that? Seems sketchy.
upvoted 0 times
...
Dyan
2 months ago
Totally agree, those inputs exploit the query!
upvoted 0 times
...
Thea
2 months ago
A) and B) will definitely work!
upvoted 0 times
...
Omer
2 months ago
I’m a bit confused about the difference between options C and D. They both seem to involve function calls, but I can't recall which one would execute correctly.
upvoted 0 times
...
Margart
2 months ago
I feel like I’ve seen something similar with the "or" statements before. I wonder if option E would actually return the expected results.
upvoted 0 times
...
Pok
2 months ago
I think option B looks familiar from our practice questions. It seems like it could exploit the query, but I’m not entirely confident about the syntax.
upvoted 0 times
...
Goldie
2 months ago
I remember we discussed how user input can lead to SQL injection-like vulnerabilities in XQuery. I'm not sure if the first option would work, though.
upvoted 0 times
...

Save Cancel