is it safe to pass data via ajax?

前端 未结 2 572
时光取名叫无心
时光取名叫无心 2021-01-26 08:59

i created script which will count child\'s div for some certain div with this command

$(\'#content\').children().size()

by this count i know to

2条回答
  •  太阳男子
    2021-01-26 09:36

    check this link,it's can be useful

    • check for authentication and authorization
    • Encrypt or add salted hash checks to data exported to the browser for resubmission
    • treat any data received in the request as potentially dangerous
    • use HTTPS where its appropriate
    • transform data leaving your PHP using the right method for were its going (htmlentities, mysql_real_escape_string
    • transform data entering your script using the right method based on its origin (e.g. json_decode)

提交回复
热议问题