php - Security risks of AJAX from validation? -


i want validate form without having reload entire page. using javascript @ moment, massively insecure. round this, want use ajax , php script validate form. know of security risks might have?

i assume ajax method far safer vanilla js, wrong?

they same risks of validating pure client side javascript. difference asking server data part of process.

the user can override javascript submit form no matter validation outcome is.

the reason use javascript @ when checking data submission save user time. if part of want such asking server if username taken while user fills out rest of form, great — quite nice use of ajax. otherwise, using ajax pretty worthless.

if want client side checking, put logic can on client , avoid making http requests. if have things can checked server side (because based on data, example usernames taken) consider using ajax that. client side check convenience check. always security check server side , on final submitted data.

note validating data submitted using ajax different matter — since final submitted data. doing ajax validation precursor final submission doesn't add trust data.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -