Reputation: 558
Recently I developed a program in Java that stores some information in a MySQL database of mine. However, someone decompiled the code enough to get the SQL user information and flood the database with entries.
Is there a way I can limit the number of entries that come from a particular IP? If not, what alternative can I use to avoid this issue while still having information passed from my program into my database?
Upvotes: 0
Views: 139
Reputation: 157839
You need to create a service.
Instead of accessing a database directly from the application, you have to make your application a client to RPC service, which will be an interface to the database.
But as long as you keep database credentials right in the application code, there is no point in devising whatever irrelevant measures like limited number of entries and such.
Upvotes: 1