Git Product home page Git Product logo

ft_transcendence's Introduction

خليها على الله Website

Welcome to the خليها على الله Website! This project aims to provide users with a platform to play Pong with others in real-time, featuring a user-friendly interface, chat functionality, and multiplayer online games.

Technologies Used

  • Interface Design: Figma
  • Backend Framework: NestJS
  • Frontend Framework: Vue.js (TypeScript)
  • Database: PostgreSQL
  • Authentication: OAuth system of 42 intranet and Google
  • Deployment: Docker and docker-compose

Key Features

User Account

  • Login using the OAuth system of 42 intranet and Google.
  • Choose a unique name and upload an avatar.
  • Enable two-factor authentication for enhanced security.
  • Add friends and view their online status.
  • Display user profiles with stats, achievements, and match history.
  • View the leaderboard of the top players.
  • View the list of all users and search for specific users.
  • Search for a specific channel and join it.

Chat

  • Create public, private, or password-protected channels.
  • Send direct messages to other users.
  • Block other users to stop seeing their messages.
  • Channel owners can set passwords, change them, and remove them.
  • Channel owners can assign other users as administrators with certain privileges.
  • Invite other users to play Pong through the chat interface.

Game

  • Play a live Pong game versus another player directly on the website.
  • Matchmaking system for automatic pairing with other players.
  • Different game modes.
  • Responsive design for optimal user experience, considering network issues.

Team

We did this project as it the final project of our school common core. It was a fun experience, we learned a lot and we are proud of what we achieved, you can meet the team members below:

  • Mabenchi aka databize: Worked on APIs,websocket endpoints and database schema and integration.
  • Abouchfa aka lfanan: User interface design and Frontend development of the website.
  • Abdessamad aka lbarid: Implemented the chat interface and functionality.
  • Zakaria2 aka lmochkile man 3andak: Worked on the frontend and backend of the game.
  • m0hs1ne aka chorti: Implemented the oauth system and security features.

Docs

You can find the Backend documentation for this project here.

Security

  • Passwords are securely hashed before storing in the database.
  • Protection against SQL injections is implemented.
  • Server-side validation is in place for forms and user input.
  • Credentials, API keys, and other sensitive information are stored locally in a .env file and ignored by Git.
  • Two-factor authentication is available for enhanced security.

Acknowledgments

Website Screenshots

Screenshot-from-2023-10-31-18-39-10 Screenshot-from-2023-10-31-18-39-19 Screenshot-from-2023-10-31-18-39-36 Screenshot-from-2023-10-31-18-40-02 Screenshot-from-2023-10-31-18-40-11 Screenshot-from-2023-10-31-18-40-17 Screenshot-from-2023-10-31-18-40-24 Screenshot-from-2023-10-31-18-41-57 Screenshot-from-2023-10-31-18-43-07 Screenshot-from-2023-10-31-18-43-15 Screenshot-from-2023-10-31-18-43-32 Screenshot-from-2023-10-31-18-43-51 Screenshot-from-2023-10-31-18-43-59 Screenshot-from-2023-10-31-18-44-07 Screenshot-from-2023-10-31-18-44-11 Screenshot-from-2023-10-31-18-44-17 Screenshot-from-2023-10-31-18-45-03 Screenshot-from-2023-10-31-18-45-16 Screenshot-from-2023-10-31-18-45-29 Screenshot-from-2023-10-31-18-45-43

ft_transcendence's People

Contributors

m0hs1ne avatar mabenchi avatar abdessamadalami avatar dependabot[bot] avatar snyk-bot avatar abdeljalil-bouchfar avatar mend-bolt-for-github[bot] avatar zakaria2ee avatar

Stargazers

 avatar  avatar HichamElmefeddel avatar  avatar

Watchers

 avatar

ft_transcendence's Issues

socket.io-client-4.7.2.tgz: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - socket.io-client-4.7.2.tgz

Path to dependency file: /Front/package.json

Path to vulnerable library: /Back/package.json,/Front/package.json

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (socket.io-client version) Remediation Possible**
CVE-2024-37890 High 7.5 ws-8.11.0.tgz Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2024-37890

Vulnerable Library - ws-8.11.0.tgz

Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js

Library home page: https://registry.npmjs.org/ws/-/ws-8.11.0.tgz

Path to dependency file: /Back/package.json

Path to vulnerable library: /Back/package.json,/Front/package.json

Dependency Hierarchy:

  • socket.io-client-4.7.2.tgz (Root Library)
    • engine.io-client-6.5.2.tgz
      • ws-8.11.0.tgz (Vulnerable Library)

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Found in base branch: main

Vulnerability Details

ws is an open source WebSocket client and server for Node.js. A request with a number of headers exceeding theserver.maxHeadersCount threshold could be used to crash a ws server. The vulnerability was fixed in [email protected] (e55e510) and backported to [email protected] (22c2876), [email protected] (eeb76d3), and [email protected] (4abd8f6). In vulnerable versions of ws, the issue can be mitigated in the following ways: 1. Reduce the maximum allowed length of the request headers using the --max-http-header-size=size and/or the maxHeaderSize options so that no more headers than the server.maxHeadersCount limit can be sent. 2. Set server.maxHeadersCount to 0 so that no limit is applied.

Publish Date: 2024-06-17

URL: CVE-2024-37890

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-3h5v-q93c-6h6q

Release Date: 2024-06-17

Fix Resolution: ws - 5.2.4,6.2.3,7.5.10,8.17.1

Step up your Open Source Security Game with Mend here

axios-1.6.0.tgz: 1 vulnerabilities (highest severity is: 7.3)

Vulnerable Library - axios-1.6.0.tgz

Path to dependency file: /Front/package.json

Path to vulnerable library: /Front/package.json

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (axios version) Remediation Possible**
CVE-2023-26159 High 7.3 follow-redirects-1.15.3.tgz Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2023-26159

Vulnerable Library - follow-redirects-1.15.3.tgz

Library home page: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz

Path to dependency file: /Front/package.json

Path to vulnerable library: /Front/package.json

Dependency Hierarchy:

  • axios-1.6.0.tgz (Root Library)
    • follow-redirects-1.15.3.tgz (Vulnerable Library)

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Found in base branch: main

Vulnerability Details

Versions of the package follow-redirects before 1.15.4 are vulnerable to Improper Input Validation due to the improper handling of URLs by the url.parse() function. When new URL() throws an error, it can be manipulated to misinterpret the hostname. An attacker could exploit this weakness to redirect traffic to a malicious site, potentially leading to information disclosure, phishing attacks, or other security breaches.

Publish Date: 2024-01-02

URL: CVE-2023-26159

CVSS 3 Score Details (7.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://www.cve.org/CVERecord?id=CVE-2023-26159

Release Date: 2024-01-02

Fix Resolution: follow-redirects - 1.15.4

Step up your Open Source Security Game with Mend here

express-4.18.2.tgz: 1 vulnerabilities (highest severity is: 6.1) - autoclosed

Vulnerable Library - express-4.18.2.tgz

Fast, unopinionated, minimalist web framework

Library home page: https://registry.npmjs.org/express/-/express-4.18.2.tgz

Path to dependency file: /Back/package.json

Path to vulnerable library: /Back/package.json

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (express version) Remediation Possible**
CVE-2024-29041 Medium 6.1 express-4.18.2.tgz Direct 4.19.0

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2024-29041

Vulnerable Library - express-4.18.2.tgz

Fast, unopinionated, minimalist web framework

Library home page: https://registry.npmjs.org/express/-/express-4.18.2.tgz

Path to dependency file: /Back/package.json

Path to vulnerable library: /Back/package.json

Dependency Hierarchy:

  • express-4.18.2.tgz (Vulnerable Library)

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Found in base branch: main

Vulnerability Details

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 are affected by an open redirect vulnerability using malformed URLs. When a user of Express performs a redirect using a user-provided URL Express performs an encode using encodeurl on the contents before passing it to the location header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list. The main method impacted is res.location() but this is also called from within res.redirect(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Publish Date: 2024-03-25

URL: CVE-2024-29041

CVSS 3 Score Details (6.1)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: Low
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-rv95-896h-c2vc

Release Date: 2024-03-25

Fix Resolution: 4.19.0

Step up your Open Source Security Game with Mend here

bcrypt-5.1.0.tgz: 1 vulnerabilities (highest severity is: 6.5)

Vulnerable Library - bcrypt-5.1.0.tgz

Path to dependency file: /Back/package.json

Path to vulnerable library: /Back/package.json

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (bcrypt version) Remediation Possible**
CVE-2024-28863 Medium 6.5 tar-6.1.15.tgz Transitive N/A*

*For some transitive vulnerabilities, there is no version of direct dependency with a fix. Check the "Details" section below to see if there is a version of transitive dependency where vulnerability is fixed.

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2024-28863

Vulnerable Library - tar-6.1.15.tgz

Library home page: https://registry.npmjs.org/tar/-/tar-6.1.15.tgz

Path to dependency file: /Back/package.json

Path to vulnerable library: /Back/package.json

Dependency Hierarchy:

  • bcrypt-5.1.0.tgz (Root Library)
    • node-pre-gyp-1.0.11.tgz
      • tar-6.1.15.tgz (Vulnerable Library)

Found in HEAD commit: c04e500e2dba304fb1708e364f6786fa050cebc1

Found in base branch: main

Vulnerability Details

node-tar is a Tar for Node.js. node-tar prior to version 6.2.1 has no limit on the number of sub-folders created in the folder creation process. An attacker who generates a large number of sub-folders can consume memory on the system running node-tar and even crash the Node.js client within few seconds of running it using a path with too many sub-folders inside. Version 6.2.1 fixes this issue by preventing extraction in excessively deep sub-folders.

Publish Date: 2024-03-21

URL: CVE-2024-28863

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: Required
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-f5x3-32g6-xq36

Release Date: 2024-03-21

Fix Resolution: tar - 6.2.1

Step up your Open Source Security Game with Mend here

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.