Skip to content

Commit

Permalink
1. Updated SQLi challenge in My Orders
Browse files Browse the repository at this point in the history
  • Loading branch information
banditVedant committed Oct 19, 2023
1 parent 38b745a commit e605443
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void onClick(View view) {
String searchText = searchBoxOrders.getText().toString();

// Check if the search text contains the blocked characters (single quote or hyphen) SQLi Challange.
if (!searchText.contains("'") && !searchText.contains("!")) {
if (!searchText.contains("'--") && !searchText.contains("' or ''='")&& !searchText.contains("' OR ''='") && !searchText.contains("' Or ''='") && !searchText.contains("' oR ''='")) {
// If the search text is valid, perform the search
filterOrdersByOrderID(searchText);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public String findLastOrderID(SQLiteDatabase db) {
}
private void insertInitialOrders(SQLiteDatabase db) {
String[][] initialData = {
{"ORDER-99", "Product Name 1", "3", "200"}
{"ORDER-99", "Hidden Secret Order.Yay!! you found it!! ", "2", "200"}
// Add more initial data here
};

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_order_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Pay Via Wallet"
android:textSize="20dp"
android:textSize="19dp"
android:layout_marginStart="5dp"
android:layout_marginBottom="10dp"
android:textStyle="bold"
Expand All @@ -230,7 +230,7 @@
android:layout_width="250dp"
android:layout_height="wrap_content"
android:text="Pay Via Razorpay"
android:textSize="20dp"
android:textSize="19dp"
android:layout_marginStart="5dp"
android:textStyle="bold"
android:layout_gravity="center_vertical"/>
Expand Down

0 comments on commit e605443

Please sign in to comment.