• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

XSS attack - prevention - AJAX ?

 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether AJAX implementations prevent XSS(Cross-site scripting) ?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

kri shan wrote:Whether AJAX implementations prevent XSS(Cross-site scripting) ?



No. The server generally takes care of scrubbing the data (simply by html encoding the data).
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax is just another way of initiating HTTP requests -- as Gregg pointed out, your code is still responsible for cleansing the data.
 
kri shan
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AJAX is server side Java Script implementation. I guess XSS attack is on the client side Scripting. Am i right ?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

kri shan wrote:AJAX is server side Java Script implementation.



No, it is not. Ajax is a technique used to send an HTTP request to a server via JavaScript without the need to refresh the browser's page.

kri shan wrote:I guess XSS attack is on the client side Scripting. Am i right ?



You don't know what XSS is and you are asking how to prevent it? I suggest you do some reading.
 
That is a really big piece of pie for such a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic