an architecture question

  • Thread starter Thread starter Ashish
  • Start date Start date
A

Ashish

I want to make all the members of a class xml safe, i.e i dont want xml
injection to be possible in all the properties, which are of type string

for this one way is to check for injected values in get and set properties,

however If i want to declare an interface , so that any class which
implements that interface , would be considered safe from xml injection,
would it be possible

can i somehow use reflection for this ?

any thoughts would be appreciated

TIA
-ashish
 
lets say if the user can enter certain values and he can enter
'>','<','&' characters, which will throw error if i try making xml
document ...

so in my cframework if i want to enforce certain classes to be safe from
this type of insertions, and i wanna create some sort of interface or
something, or a reflection class , it is possible ?

-ashish
 
* "=?Utf-8?B?dE1hbg==?= said:
what do you mean by "XML injection" and XML safe?
and why do you want that?

For example, if you have this file:

\\\
....
<foo>
<bar>Value</bar>
</foo>
....
///

.... and you change the value of bar, it must not change the structure of
the XML file (new value = "Value</bar></foo><foo><bar>x"):

\\\
....
<foo>
<bar>Value</bar></foo><foo><bar>xy</bar>
</foo>
....
///
 
Back
Top