A software developed using Java SE which provides as easy way to track the products, suppliers, customers as well as purchase and sales information. It also records the stock currently available in the store.
First Violation:
In the CustomerDAO clas i found a function which adds the class another responsability. the method ProductsName searchs all the products availables and shows its names.
Anothe Class should be created which consults the proudcts available.
Second Violation:
In the class ProductDao i found the same method and 2 more mthods which broke the principle. The methods getSupplierCode
and getSupplersInfo should be managed by another class.
Another class Suppier should be created which controls those methods, and remove the ProductsName method should be removed.
Describe the bug
Normal users can’t login. The reason for the bug is that in ConnectionFactory class the checkLogin method is having hard-coded SQL query for ADMINISTRATOR instead of ADMINISTRATOR or Normal User. Therefore, if a Normal User tries to login into the application. This query returns a NULL result.
To Reproduce
Steps to reproduce the behavior:
Enter Username : (Normal User's username)
Enter password : (Normal User's password)
User gets login error.
Expected behavior
Users should allow logging into the system if their Username and password associated with the Username is correct.
Hey, I find few parameters are vulnerable to SQL injection vulnerability.
A list of affected files:
UserDAO.java
Stocks.java
SupplierDAO.java
ProductDAO.java
CustomerDAO.java
ConnectionFactory.java
@sazanrjb dude you wrote very clean code i saw your source code appreciable
now my question is that how could i run the software as you provide the link of just running software locally
when ever i run and put username user4 and password test123 it says invalid id pass
and when i run in eclipse it give me mysql error i tried so much but i could not trouble shoot it
i will be thankful if you tell me process
I have created Database , As well setup the project with jdbc
but still it can't connect with mysql server
i have tried using
user4, test123 or Test123
but failed to connect and get this error in my console screen: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:923) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:404) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.inventory.database.ConnectionFactory.<init>(ConnectionFactory.java:26) at com.inventory.ui.LoginDialog.loginBttnMouseClicked(LoginDialog.java:193) at com.inventory.ui.LoginDialog.access$1(LoginDialog.java:187) at com.inventory.ui.LoginDialog$2.mouseClicked(LoginDialog.java:68)
Hello,i'm from China,very interesting in your work ,can you send me the username and password to me for the project InventoryManagementSystem? sincerely thank you.