javascript - Security of writing/retrieving data from JS through PHP -
i have web app lets users make todo-lists, save them server , retrieve them id (no login/user session, id, if guess id...).
- the id passed jquery php via post.
- if id correct , not password-protected, php echoes data jquery.
- new items saved post jquery php.
no database. every list sits in own file, {id}.txt. front-end code used render webpage, ractive.js, escapes html characters.
i'm checking no fields jquery php , sent id in format i've chosen. location of {id}.txt's not accessible outside.
is safe? i'm new php security. have no idea if there's simple thing cannot see. i'm guessing should fine since data stored in txt files , checked validity.
do need sanitize inputs in way? cannot find real reason it. php checks valid ids using file_exists(). ok?
thank lot. ask other details if needed.
Comments
Post a Comment