amupedia2021 / amupedia-web

Source code of the website.
https://www.amupedia.site/
MIT License
162 stars 176 forks source link

🐞 [BUG] - The DB is exposed. #632

Open harsh-haria opened 4 months ago

harsh-haria commented 4 months ago

Description

The connection URL of MongoDB server is exposed in the code. I can fix this. Can you assign this issue to me? working on this under GSSOC 2024.

Current behaviour

MongoDB URL is directly in the code itself. Anyone with the link can use it to access the db and make changes to the database,

Expected behaviour

The URL should have been in an environment file which is not tracked on Github and is on the hosting server only. The link should be then passed in the code by the process. This makes sure that no one apart from the creators get access to the live database. And for the contributors, we can add the steps in the readme file so they can create their own local version of the database and work on it rather than working on the live database itself.

Reproduction steps

1. Go to 'db/db.js'
2. Scroll down to 'Line 18'
4. See the exposed link.

Screenshots

masked the link for ensuring safety

masked the link for ensuring safety

Logs

No response

Browsers

Microsoft Edge

OS

Windows

Are you contributing for a program ?

GSSoC2023

Code of Conduct

github-actions[bot] commented 4 months ago

Hello @harsh-haria! Thank you for raising this issue.

Please make sure to follow our Contributing Guidelines. 💪🏻 Don't forget to ⭐ our Project-Amupedia. 📔

Our review team will carefully assess the issue and reach out to you soon! 😇 We appreciate your patience! 😀

amanjaiswal7236 commented 4 months ago

I like to work on this issue under GSSOC'24 I can resole this issue by adding MONGODB_URL in the .env file as standards.