Skip to content

Commit

Permalink
Default SOCIAL_AUTH_ASSOCIATE_BY_EMAIL to False to avoid some secury …
Browse files Browse the repository at this point in the history
…risks (while it's not removed). Closes omab#356
  • Loading branch information
omab committed Jul 9, 2012
1 parent ce08404 commit 9cd3579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ Configuration

It is also possible to associate multiple user accounts with a single email
address, set value as True to enable, otherwise set as False to disable.
This behavior is enabled by default (True) unless specifically set::
This behavior is disabled by default (False) unless specifically set::

SOCIAL_AUTH_ASSOCIATE_BY_MAIL = False
SOCIAL_AUTH_ASSOCIATE_BY_MAIL = True

- You can send extra parameters on auth process by defining settings per
provider, example to request Facebook to show Mobile authorization page,
Expand Down
4 changes: 2 additions & 2 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ Configuration

It is also possible to associate multiple user accounts with a single email
address, set value as True to enable, otherwise set as False to disable.
This behavior is enabled by default (True) unless specifically set::
This behavior is disabled by default (False) unless specifically set::

SOCIAL_AUTH_ASSOCIATE_BY_MAIL = False
SOCIAL_AUTH_ASSOCIATE_BY_MAIL = True

- You can send extra parameters on auth process by defining settings per
provider, example to request Facebook to show Mobile authorization page,
Expand Down
2 changes: 1 addition & 1 deletion social_auth/backends/pipeline/associate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def associate_by_email(details, user=None, *args, **kwargs):

warn_setting('SOCIAL_AUTH_ASSOCIATE_BY_MAIL', 'associate_by_email')

if email and setting('SOCIAL_AUTH_ASSOCIATE_BY_MAIL', True):
if email and setting('SOCIAL_AUTH_ASSOCIATE_BY_MAIL', False):
# try to associate accounts registered with the same email address,
# only if it's a single object. AuthException is raised if multiple
# objects are returned
Expand Down

0 comments on commit 9cd3579

Please sign in to comment.