0

I would ask about using javascript function on server side for validation, are is true, secure and truth way ?

I see a website was development like this .. when user post data, php file was call a javascript function and check if valid or no .. so im ask about it.

I think its not secure, for many of cases like XSS, if Im true, can you give me some of issue for this procedure.

thanks a lot.

Anees Hikmat Abu Hmiad
  • 3,460
  • 2
  • 19
  • 36

1 Answers1

2

Since you clarified that you mean server side JS:

There are no inherit insecurities when performing input validation on the server, even if you pass the data from one server side program (which could be written in PHP) to another server side program (which could be written in JavaScript).

That does, however, add complexity and complexity is opportunity for bugs to slip in.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335