owaspsamm / dashboard-webapp

21 stars 8 forks source link

SQL file errors #3

Open sleightsec opened 2 years ago

sleightsec commented 2 years ago

Bug: When trying to run db script (samm.sql), the script errors out:

Results: script cannot create foreign key relationship due to table not in existence

ubuntu@ip-172-31-24-36:~/dashboard-webapp$ sudo mysql -u root -p -D samm < samm.sql
Enter password:
ERROR 1824 (HY000) at line 1248: Failed to open the referenced table 'role_copy'
ubuntu@ip-172-31-24-36:~/dashboard-webapp$

Expected results: command runs without errors

ubuntu@ip-172-31-24-36:~/dashboard-webapp$ sudo mysql -u root -p -D samm < samm.sql
Enter password:
ubuntu@ip-172-31-24-36:~/dashboard-webapp$

Issues:

  1. Alter table command references non-existent table (roles_copy) should be (roles)
  2. Roles table does not have primary key
  3. Roles table has duplicated values in the 'id' column

PR will follow