Skip to content

Commit

Permalink
Update SelectDBRecord.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Chewhern committed Dec 30, 2021
1 parent 2ed004d commit c4b0100
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions V2/Controllers/SelectDBRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ public DBRecordsModel RetrieveDBRecords(NormalDBModel MySelectModel)
ClientMySQLGeneralQuery.Connection = ClientMySQLDB.ClientMySQLConnection;
ClientMySQLGeneralQuery.Prepare();
ClientDataReader = ClientMySQLGeneralQuery.ExecuteReader();
//Potential unsolvable issue which could lead to DDOS attack
//The code here involves with both counting row count and retrieving records(if exists)
//Ideally, in all mysql databases, this is not an issue as the database and the server were
//used by only certain types of users
//through the use of LIMIT and OFFSET key words in MySQL
//The developer's MySQL query can also be treated as nuclear wastes
//in such cases, if they don't use the keywords of LIMIT and OFFSET
//it could be used intentionally or unintentionally as a way to overburden the server.
//The likelihood that it can happen is unknown.. Please do take note of these comments.
while (ClientDataReader.Read())
{
DBCount += 1;
Expand Down

0 comments on commit c4b0100

Please sign in to comment.