Skip to Main Content
Secure Development for Mobile Apps
book

Secure Development for Mobile Apps

by J. D. Glaser
October 2014
Intermediate to advanced content levelIntermediate to advanced
472 pages
10h 44m
English
Auerbach Publications
Content preview from Secure Development for Mobile Apps
308
seCure develoPment For mobIle APPs
if(confirm.val() = = pass.val()){
confirm.parent().removeClass('bad').addClass('good');
}
else{
confirm.parent().removeClass('good').addClass('bad');
}
});
JavaScript and jQuery Escaping and Filtering
Whenever data is being retrieved from a source that has not been filtered or escaped
by you, then the possibility exists for an XSS attack, depending on how JavaScript or
jQuery display the data on the HTML page. e following snippet shows methods
that allow XSS to execute, and methods that prevent execution.
$(function() {
//result from favorite RSS feed site
var rss = "<script>alert('attack');</script>";
//Allow XSS to Execute
$("#feed").html(rss);
$("#feed").append(rss);
//Prevent XSS from Executing
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Developing with Web Standards

Developing with Web Standards

John Allsopp
Mobile Cloud Computing

Mobile Cloud Computing

Dijiang Huang, Huijun Wu

Publisher Resources

ISBN: 9781482209037