Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #788

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Develop #788

wants to merge 4 commits into from

Conversation

sofiiasavkova
Copy link

No description provided.

Copy link

@Bondzik-S Bondzik-S left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG)

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your hard work on this project! Your code is well-structured and mostly meets the task requirements. However, there are a few critical security issues in the settings.py file that need to be addressed before we can approve the pull request:

  1. ALLOWED_HOSTS: The ALLOWED_HOSTS list is currently empty. In a production environment, it's crucial to specify the domain names that are allowed to serve your application to prevent HTTP Host header attacks.

  2. DEBUG Setting: The DEBUG setting is set to True. For production, this should be set to False to avoid exposing sensitive information in error messages.

  3. SECRET_KEY: The SECRET_KEY is hardcoded in the settings file. It's important to use environment variables to manage sensitive information like the secret key to enhance security.

Once these issues are resolved, your code will be in great shape! Keep up the excellent work and don't hesitate to reach out if you need any help. 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

app/settings.py Outdated Show resolved Hide resolved
app/settings.py Outdated Show resolved Hide resolved
app/settings.py Outdated Show resolved Hide resolved
Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code is well-structured and meets the task requirements. Great job on setting up the Django project and implementing the Movie model, serializers, and API views correctly. 🎉

However, there are a few areas to improve:

  • ALLOWED_HOSTS: Currently, it includes only 'localhost' and '127.0.0.1'. For production, make sure to specify the actual domain names or IP addresses to prevent HTTP Host header attacks.

  • Tests: The tests.py file is empty. Adding test cases will ensure the functionality of your application components, such as models, views, and serializers.

These improvements will enhance the security and reliability of your application. Keep up the good work and continue learning from these experiences! 🚀

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

ALLOWED_HOSTS = ['localhost', '127.0.0.1']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ALLOWED_HOSTS list currently includes only 'localhost' and '127.0.0.1'. For a production environment, you should specify the actual domain names or IP addresses that are allowed to serve your application to prevent HTTP Host header attacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants