Letractively / osclass

Automatically exported from code.google.com/p/osclass
0 stars 0 forks source link

Validate fields! #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Put some JS scripts while registering;
2. Look into DB
mysql> select * from osc2_t_user limit 1,2\G;
*************************** 1. row ***************************
       pk_i_id: 2
   dt_reg_date: 0000-00-00 00:00:00 <-- THIS EMPTY AS WELL
   dt_mod_date: NULL
        s_name: Earl<script>alert('earl!');</script>
    s_username: my_name_is_earl
    s_password: 41d910b1f6a479ce25b081eced3ea7941f329dd7
      s_secret: NULL
       s_email: earl@earl.com
     s_website: http://www.earl.com
        s_info: i'm so cool! <script>alert('hacked!');</script>
  s_phone_land: 12321414
s_phone_mobile: 12qwqweqw
     b_enabled: 0
1 row in set (0.00 sec)

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

Original issue reported on code.google.com by max.podu...@gmail.com on 12 Apr 2010 at 2:40

GoogleCodeExporter commented 8 years ago

Original comment by max.podu...@gmail.com on 12 Apr 2010 at 2:40

GoogleCodeExporter commented 8 years ago
Ok. I'm creating a InputValidation class to handle this situation. By now I'm 
using
the filter_input_array function.
Creation date is now correctly populated.

Original comment by santiago...@gmail.com on 13 Apr 2010 at 8:46