2) Write SVG-like tags for a stop sign. Since you don't have the SVG
documentation available, you are allowed to invent the tag names and
attributes used in the tags. You can leave the attribute values empty
apart from the colour attributes. Include only the tags for the stop
sign, not the general tags that are at the start of every SVG
document.
2) An inexperienced web developer installs a script from CPAN on a webserver.
Because of this web developer's action, a few weeks later the security of the
webserver is compromised. What is a likely possibility for the break-in? How did the
hacker find out about the security problem on the server?
3) In PHP the directive "register globals" means that all sorts of
variables are automatically inserted into a script. For example, if
"register globals" is "on", a variable "username" from an HTML form,
can simply be printed as "$username" without using "$_REQUEST[]". In
early versions of PHP, the default for "register globals" was set to
"on". But starting with version 4.2, the default for "register
globals" has been set to "off". Provide one argument for why "register
globals" should be "on" and one argument for why it is better to turn
this directive off. If PHP were to require all variables to be
initialised, would it then be secure to leave "register globals" on?
The example used in this exercise should be:
"Cooking pasta with tomato sauce".
1)
<module></module>
2)
<module><lecture></lecture></lecture>
<lecture></module>
3)
<module><lecture></lecture><lecture/>
<practical /></module>
4)
<module>
</lecture><lecture/><practical></module>
5)
<module><lecture><slide Nr="1"/></lecture>
</module>
6)
<module><lecture><slide Nr=1></lecture>
</slide></module>
7)
<module>
<lecture>
<slide Nr="1"/>
<image><jpg/></image>
</lecture> 8)
<module><lecture>First lesson with <exercise>
One</exercise>
</lecture></module>
9)
<module><lecture><lecture>
</lecture></lecture></module>
10)
<module><lecture>This is a square bracket: <
</lecture></module>
11)
<module>C & IT</module>
12)
<html><h3>Hello<p> World!
</h3></html>
13)
<html><img src="file.gif"></html>
14)
<html><font color=blue>Hello</font></html>
XML processing with regular expressions: Security Exercises
1) Below are two adjacent lines from a server-side script.
$user = param("user");
$db->prepare("SELECT $user from this_table;");
Is this code secure? Provide a reason for your answer.
XML Exercise
Create an XML format for a cooking recipe. It should contain:
If an ingredient is used in a cooking instruction, this relationship
should be marked-up.
XML Exercise
Which of the following XML documents are well-formed:
<practical><slide Nr="2" size="12" >
</slide>
</practical>
</module>
DOM/SAX Exercises
With respect to an XHTML document, write the DOM/SAX statements that retrieve ...
Optional:
outline a pseudocode sequence that parses a complete XHTML document and
stores it in a tree data structure.
Regular Expression exercises
Write a regular expression for
Write the split/implode statements that split a sentence into words
and then join the words with a comma between.
(note: the pipe symbol "|" means "or")
(Note: "+?" means "any number of characters, but as little as possible")
Unicode questions
code point, glyph, code element.