Lately I've seen so many attacks of this type, so I wanted to ask what is the proper way to defend against XML External Entity (XXE) Processing vulnerability. For example what if I parse some simple xml in my app, how can I make it stronger so this attack or billion laughs doesn't work. Attack :
Also protection against these types of attacks http://josipfranjkovic.blogspot.com/2014/12/reading-local-files-from-facebooks.html ?