Giter Site home page Giter Site logo

edgarjrivera / bookea-tu-mesa Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 9.5 MB

Bookea tu Mesa is a restaurant reservation web page for restaurants in Puerto Rico

Home Page: https://edgarjrivera.github.io/Bookea-tu-Mesa/

PHP 43.39% CSS 42.82% Hack 13.79%
restaurant restaurant-reservation restaurant-website restaurants

bookea-tu-mesa's People

Contributors

aagosto98 avatar edgarjrivera avatar xito-2901 avatar zon-danim7 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

bookea-tu-mesa's Issues

SQLI Injection Found

We have discovered a SQL Injection vulnerability in Bookea-tu-Mesa. This vulnerability allows an attacker to inject malicious SQL statements which can manipulate or disclose data in the database.

Steps to Reproduce:

  1. Go to http://localhost/Bookea-tu-Mesa/ReservationTable.php.
  2. In the search field, type the following SQL injection payload: ''"+UNION+SELECT+VERSION(),NULL,NULL,NULL,NULL,NULL,NULL,NULL#'.
  3. The query will show the database version, demonstrating the SQL injection vulnerability.

Vulnerable Code:
The vulnerability exists in insert_reservation.php at the following lines:

Line 40: $query = "SELECT * FROM reservaciones WHERE RestaurantName LIKE '%$search_query%' OR FullName LIKE '%$search_query%'";
Line 41: $result = $conex->query($query);
Line 87:$result->free();

Suggested Fix:
Use prepared statements with parameterized queries to prevent SQL injection. Here is the revised code:

// insert_reservation.php
$query = "SELECT * FROM reservaciones WHERE RestaurantName LIKE ? OR FullName LIKE ?";
$stmt = $conex->prepare($query);
$search_with_wildcards = '%' . $search_query . '%';
$stmt->bind_param('ss', $search_with_wildcards, $search_with_wildcards);
$stmt->execute();
$result = $stmt->get_result();
$stmt->close();

CVE Consideration:
I believe this issue warrants a CVE ID because it poses a significant security risk. I am willing to coordinate with you on the CVE submission process if you agree that this issue meets the criteria.

Stored Cross-Site Scripting Found

We have discovered a Stored Cross-Site Scripting (XSS) vulnerability in Bookea-tu-Mesa. This vulnerability allows an attacker to inject malicious scripts which are executed in the context of the user's session.

Steps to Reproduce:

  1. Go to http://localhost/Bookea-tu-Mesa/index.php
  2. Enter "<script>alert('XSS');</script>" in the Full Name and submit.
  3. The script executes, demonstrating the XSS vulnerability.

Vulnerable Code:
File: insert_reservation.php
Line 11: $Fname = mysqli_real_escape_string($conex, $_POST['Fname']);

Suggested Fix:
$Fname = htmlspecialchars(mysqli_real_escape_string($conex, $_POST['Fname']), ENT_QUOTES, 'UTF-8');

This would sanitize the HTML character.
CVE Consideration: I believe this issue warrants a CVE ID because it poses a significant security risk. I am willing to coordinate with you on the CVE submission process if you agree that this issue meets the criteria.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.