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

1.0beta3 #439

Merged
merged 1 commit into from Apr 18, 2021
Merged

1.0beta3 #439

merged 1 commit into from Apr 18, 2021

Conversation

ashwin31
Copy link
Member

No description provided.

@ashwin31 ashwin31 merged commit 3f889e0 into master Apr 18, 2021
Copy link

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

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

Some things to consider

street = models.CharField(_("Street"), max_length=55, blank=True, default="")
city = models.CharField(_("City"), max_length=255, blank=True, default="")
state = models.CharField(_("State"), max_length=255, blank=True, default="")
postcode = models.CharField(_("Post/Zip-code"), max_length=64, blank=True, default="")
postcode = models.CharField(
_("Post/Zip-code"), max_length=64, blank=True, default=""

Choose a reason for hiding this comment

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

null=True on a string field causes inconsistent data types because the value can be either str or None. This adds complexity and maybe bugs, but can be solved by replacing null=True with default="".

@@ -240,4 +240,4 @@
SECURE_HSTS_PRELOAD = True
SECURE_CONTENT_TYPE_NOSNIFF = True

DEFAULT_AUTO_FIELD='django.db.models.AutoField'
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

Choose a reason for hiding this comment

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

Suggested change
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
SECURE_SSL_REDIRECT = os.getenv("SECURE_SSL_REDIRECT_ENABLED") != "False"
SESSION_COOKIE_SECURE = os.getenv("SESSION_COOKIE_SECURE_ENABLED") != "False"

Consider setting SECURE_SSL_REDIRECT to prevent users from accessing the website over HTTP. HTTP connections allow bad actors to intercept passwords and session cookies, and to easily change the contents of the request or response.

Consider setting SESSION_COOKIE_SECURE to prevent cookies from being sent over non HTTPS connections. Cookies sent over insecure HTTP connections can be intercepted by hackers.

@ashwin31 ashwin31 deleted the 1.0beta3 branch April 18, 2021 05:51
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.

None yet

1 participant