Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-django-registration for openSUSE:Factory checked in at 2021-04-17 00:01:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-django-registration (Old) and /work/SRC/openSUSE:Factory/.python-django-registration.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-registration" Sat Apr 17 00:01:42 2021 rev:17 rq:885877 version:3.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-django-registration/python-django-registration.changes 2020-04-21 13:11:14.648881316 +0200 +++ /work/SRC/openSUSE:Factory/.python-django-registration.new.12324/python-django-registration.changes 2021-04-17 00:01:48.473598112 +0200 @@ -1,0 +2,7 @@ +Fri Apr 16 07:48:17 UTC 2021 - Mark??ta Machov?? <mmach...@suse.com> + +- Update to 3.1.2 (bsc#1184427, CVE-2021-21416) + * Filter sensitive POST parameters in error reports + * Fix RemovedInDjango40Warning from Signal arguments + +------------------------------------------------------------------- Old: ---- django-registration-3.1.tar.gz New: ---- django-registration-3.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-django-registration.spec ++++++ --- /var/tmp/diff_new_pack.Xu0FE7/_old 2021-04-17 00:01:50.609601481 +0200 +++ /var/tmp/diff_new_pack.Xu0FE7/_new 2021-04-17 00:01:50.613601487 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-django-registration # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define skip_python2 1 Name: python-django-registration -Version: 3.1 +Version: 3.1.2 Release: 0 Summary: An extensible user-registration application for Django License: BSD-3-Clause ++++++ django-registration-3.1.tar.gz -> django-registration-3.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/LICENSE new/django-registration-3.1.2/LICENSE --- old/django-registration-3.1/LICENSE 2020-01-02 03:22:54.000000000 +0100 +++ new/django-registration-3.1.2/LICENSE 2021-04-01 07:00:01.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2007-2020, James Bennett +Copyright (c) 2007-2021, James Bennett All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/PKG-INFO new/django-registration-3.1.2/PKG-INFO --- old/django-registration-3.1/PKG-INFO 2020-01-27 00:20:30.000000000 +0100 +++ new/django-registration-3.1.2/PKG-INFO 2021-04-01 07:04:23.594258300 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: django-registration -Version: 3.1 +Version: 3.1.2 Summary: An extensible user-registration application for Django Home-page: https://github.com/ubernostrum/django-registration/ Author: James Bennett @@ -8,15 +8,16 @@ License: UNKNOWN Description: .. -*-restructuredtext-*- - .. image:: https://travis-ci.org/ubernostrum/django-registration.svg?branch=master - :target: https://travis-ci.org/ubernostrum/django-registration + .. image:: https://github.com/ubernostrum/django-registration/workflows/CI/badge.svg + :alt: CI status image + :target: https://github.com/ubernostrum/django-registration/actions?query=workflow%3ACI This is a user-registration application for `Django <https://www.djangoproject.com/>`_. There are two registration workflows (one-step, and two-step with activation) built in, and it's designed to be extensible and support building additional workflows. - Full documentation is `available online + To get started, check out `the documentation <https://django-registration.readthedocs.io/>`_. Platform: UNKNOWN @@ -25,6 +26,7 @@ Classifier: Framework :: Django Classifier: Framework :: Django :: 2.2 Classifier: Framework :: Django :: 3.0 +Classifier: Framework :: Django :: 3.1 Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/README.rst new/django-registration-3.1.2/README.rst --- old/django-registration-3.1/README.rst 2018-09-02 15:00:29.000000000 +0200 +++ new/django-registration-3.1.2/README.rst 2020-12-12 10:40:37.000000000 +0100 @@ -1,12 +1,13 @@ .. -*-restructuredtext-*- -.. image:: https://travis-ci.org/ubernostrum/django-registration.svg?branch=master - :target: https://travis-ci.org/ubernostrum/django-registration +.. image:: https://github.com/ubernostrum/django-registration/workflows/CI/badge.svg + :alt: CI status image + :target: https://github.com/ubernostrum/django-registration/actions?query=workflow%3ACI This is a user-registration application for `Django <https://www.djangoproject.com/>`_. There are two registration workflows (one-step, and two-step with activation) built in, and it's designed to be extensible and support building additional workflows. -Full documentation is `available online +To get started, check out `the documentation <https://django-registration.readthedocs.io/>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/conf.py new/django-registration-3.1.2/docs/conf.py --- old/django-registration-3.1/docs/conf.py 2020-01-27 00:10:35.000000000 +0100 +++ new/django-registration-3.1.2/docs/conf.py 2021-04-01 07:00:01.000000000 +0200 @@ -1,7 +1,6 @@ import os import sys - on_rtd = os.environ.get("READTHEDOCS", None) == "True" extensions = ["sphinx.ext.intersphinx"] @@ -9,12 +8,11 @@ source_suffix = ".rst" master_doc = "index" project = "django-registration" -copyright = "2007-2019, James Bennett" +copyright = "2007-2021, James Bennett" version = "3.1" -release = "3.1" +release = "3.1.2" exclude_trees = ["_build"] pygments_style = "sphinx" -html_static_path = ["_static"] htmlhelp_basename = "django-registrationdoc" latex_documents = [ ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/faq.rst new/django-registration-3.1.2/docs/faq.rst --- old/django-registration-3.1/docs/faq.rst 2020-01-26 23:18:15.000000000 +0100 +++ new/django-registration-3.1.2/docs/faq.rst 2020-09-21 09:05:02.000000000 +0200 @@ -51,7 +51,7 @@ What versions of Django and Python are supported? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -As of django-registration |release|, Django 2.2 and 3.0 are supported, +As of django-registration |release|, Django 2.2, 3.0, and 3.1 are supported, on Python 3.5 (Django 2.2 only), 3.6, 3.7, and 3.8. I found a bug or want to make an improvement! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/install.rst new/django-registration-3.1.2/docs/install.rst --- old/django-registration-3.1/docs/install.rst 2020-01-26 22:19:37.000000000 +0100 +++ new/django-registration-3.1.2/docs/install.rst 2020-09-21 09:04:47.000000000 +0200 @@ -4,12 +4,12 @@ Installation guide ================== -The |release| release of django-registration supports Django 2.2 and -3.0 on the following Python versions: +The |release| release of django-registration supports Django 2.2, 3.0, +and 3.1 on the following Python versions: * Django 2.2 supports Python 3.5, 3.6, 3.7, and 3.8. -* Django 3.0 supports Python 3.6, 3.7, and 3.8. +* Django 3.0 and 3.1 support Python 3.6, 3.7, and 3.8. Normal installation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/one-step-workflow.rst new/django-registration-3.1.2/docs/one-step-workflow.rst --- old/django-registration-3.1/docs/one-step-workflow.rst 2020-01-26 22:51:23.000000000 +0100 +++ new/django-registration-3.1.2/docs/one-step-workflow.rst 2020-09-21 09:02:57.000000000 +0200 @@ -82,7 +82,7 @@ The one-step workflow uses two templates: * `django_registration/registration_form.html`. -* `django_registration/registration_disallowed.html` +* `django_registration/registration_closed.html` See :ref:`the quick start guide <default-form-template>` for details of these templates. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/quickstart.rst new/django-registration-3.1.2/docs/quickstart.rst --- old/django-registration-3.1/docs/quickstart.rst 2020-01-26 22:57:17.000000000 +0100 +++ new/django-registration-3.1.2/docs/quickstart.rst 2020-09-21 09:14:02.000000000 +0200 @@ -8,7 +8,7 @@ <install>`. The next steps will depend on which registration workflow you'd like -to use. There two workflows built in to django-registration: +to use. There are two workflows built into django-registration: * :ref:`The two-step activation workflow <activation-workflow>`, which implements a two-step process: a user signs up, then is emailed an @@ -161,12 +161,11 @@ sent. -`django_registration/registration_disallowed.html` +`django_registration/registration_closed.html` `````````````````````````````````````````````````` Used when registration of new user accounts is disabled. This template -has no context variables of its own, and should inform the user that -an email containing account-activation information has been sent. +has no context variables of its own. `django_registration/activation_failed.html` @@ -304,6 +303,17 @@ Users could then register accounts by visiting the URL `/accounts/register/`. +The following URL names are defined by +`django_registration.backends.one_step.urls`: + +* `django_registration_register` is the account-registration view. + +* `django_registration_complete` is the post-registration success + message. + +* `django_registration_disallowed` is a message indicating registration is + not currently permitted. + This URLconf will also configure the appropriate URLs for the rest of the built-in `django.contrib.auth` views (log in, log out, password reset, etc.). @@ -311,7 +321,7 @@ Finally, you will need to create following templates: * `django_registration/registration_form.html` -* `django_registration/registration_disallowed.html` +* `django_registration/registration_closed.html` See :ref:`the documentation above <default-form-template>` for details of these templates. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/docs/upgrade.rst new/django-registration-3.1.2/docs/upgrade.rst --- old/django-registration-3.1/docs/upgrade.rst 2020-01-26 23:15:44.000000000 +0100 +++ new/django-registration-3.1.2/docs/upgrade.rst 2021-04-01 07:00:01.000000000 +0200 @@ -16,7 +16,29 @@ and improvements, documented here along with the version in which they occurred. -django-registration 3.1 +django-registration 3.1.2 +~~~~~~~~~~~~~~~~~~~~~~~~~ + +This release fixes a security issue with low severity. + +Prior to 3.1.2, django-registration did not apply Django's +:func:`~django.views.decorators.debug.sensitive_post_parameters` +decorator to the base +:class:`~django_registration.views.RegistrationView`. This meant that +if detailed error reports, such as `Django's error reports emailed to +site staff +<https://docs.djangoproject.com/en/3.1/howto/error-reporting/#email-reports>`_, +were enabled, and a server-side error occurred during account +registration, the generated error report would include all fields +submitted in the HTTP request, some of which are potentially sensitive +depending on the user-account model and registration workflow in use. + +This issue is CVE-2021-21416 and GitHub security advisory +GHSA-58c7-px5v-82hh. + +Thanks to Martin Morgenstern for reporting this issue. + +Django-registration 3.1 ~~~~~~~~~~~~~~~~~~~~~~~ * When an attempt was made to use django-registration with a custom diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/runtests.py new/django-registration-3.1.2/runtests.py --- old/django-registration-3.1/runtests.py 2020-01-05 11:29:52.000000000 +0100 +++ new/django-registration-3.1.2/runtests.py 2020-02-16 20:44:58.000000000 +0100 @@ -68,8 +68,7 @@ # and other bits: import django - if hasattr(django, "setup"): - django.setup() + django.setup() # Now we instantiate a test runner... from django.test.utils import get_runner diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/setup.cfg new/django-registration-3.1.2/setup.cfg --- old/django-registration-3.1/setup.cfg 2020-01-27 00:20:30.000000000 +0100 +++ new/django-registration-3.1.2/setup.cfg 2021-04-01 07:04:23.596072400 +0200 @@ -1,6 +1,11 @@ [metadata] license_file = LICENSE +[coverage:paths] +source = + src + .tox/*/site-packages + [coverage:report] fail_under = 100 exclude_lines = @@ -9,19 +14,19 @@ raise NotImplementedError [flake8] -exclude = locale,__pycache__,.pyc,templates -ignore = - E203, - W503 +extend-ignore = E203 max-complexity = 10 max-line-length = 88 [isort] -include_trailing_comma = True -known_first_party = django_registration -known_third_party = django -lines_after_imports = 2 -multi_line_output = 3 +profile = black + +[check-manifest] +ignore = + __pycache__ + *.pyc +ignore-bad-ideas = + *.mo [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/setup.py new/django-registration-3.1.2/setup.py --- old/django-registration-3.1/setup.py 2020-01-27 00:10:25.000000000 +0100 +++ new/django-registration-3.1.2/setup.py 2021-04-01 07:00:01.000000000 +0200 @@ -2,11 +2,10 @@ from setuptools import find_packages, setup - setup( name="django-registration", zip_safe=False, # eggs are the devil. - version="3.1", + version="3.1.2", description="An extensible user-registration application for Django", long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author="James Bennett", @@ -21,6 +20,7 @@ "Framework :: Django", "Framework :: Django :: 2.2", "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/backends/activation/urls.py new/django-registration-3.1.2/src/django_registration/backends/activation/urls.py --- old/django-registration-3.1/src/django_registration/backends/activation/urls.py 2020-01-05 09:15:29.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/backends/activation/urls.py 2020-12-12 08:50:04.000000000 +0100 @@ -9,7 +9,6 @@ from . import views - urlpatterns = [ path( "activate/complete/", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/backends/activation/views.py new/django-registration-3.1.2/src/django_registration/backends/activation/views.py --- old/django-registration-3.1/src/django_registration/backends/activation/views.py 2020-01-01 11:04:01.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/backends/activation/views.py 2020-12-12 08:50:04.000000000 +0100 @@ -11,14 +11,13 @@ from django.core import signing from django.template.loader import render_to_string from django.urls import reverse_lazy -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django_registration import signals from django_registration.exceptions import ActivationError from django_registration.views import ActivationView as BaseActivationView from django_registration.views import RegistrationView as BaseRegistrationView - REGISTRATION_SALT = getattr(settings, "REGISTRATION_SALT", "registration") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/backends/one_step/urls.py new/django-registration-3.1.2/src/django_registration/backends/one_step/urls.py --- old/django-registration-3.1/src/django_registration/backends/one_step/urls.py 2020-01-05 11:30:43.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/backends/one_step/urls.py 2020-12-12 08:50:04.000000000 +0100 @@ -9,7 +9,6 @@ from . import views - urlpatterns = [ path( "register/", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/backends/one_step/views.py new/django-registration-3.1.2/src/django_registration/backends/one_step/views.py --- old/django-registration-3.1/src/django_registration/backends/one_step/views.py 2019-10-13 10:49:22.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/backends/one_step/views.py 2020-12-12 08:50:04.000000000 +0100 @@ -10,7 +10,6 @@ from django_registration import signals from django_registration.views import RegistrationView as BaseRegistrationView - User = get_user_model() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/forms.py new/django-registration-3.1.2/src/django_registration/forms.py --- old/django-registration-3.1/src/django_registration/forms.py 2020-01-26 23:20:04.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/forms.py 2020-12-12 08:50:04.000000000 +0100 @@ -12,11 +12,10 @@ from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from . import validators - User = get_user_model() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/locale/es/LC_MESSAGES/django.po new/django-registration-3.1.2/src/django_registration/locale/es/LC_MESSAGES/django.po --- old/django-registration-3.1/src/django_registration/locale/es/LC_MESSAGES/django.po 2018-09-02 15:00:29.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/locale/es/LC_MESSAGES/django.po 2020-09-21 09:02:57.000000000 +0200 @@ -23,7 +23,7 @@ #: forms.py:41 msgid "email address" -msgstr "direcci??n de coreo electr??nico" +msgstr "direcci??n de correo electr??nico" #: forms.py:43 msgid "password" @@ -35,7 +35,7 @@ #: forms.py:54 msgid "Usernames can only contain letters, numbers and underscores" -msgstr "Los nombres de usuarios s??lo pueden contener letras, n??meros y guiones bajos" +msgstr "Los nombres de usuario s??lo pueden contener letras, n??meros y guiones bajos" #: forms.py:59 msgid "This username is already taken. Please choose another." @@ -65,7 +65,7 @@ "Registration using free email addresses is prohibited. Please supply a different " "email address." msgstr "" -"El registro usando una direcci??n de correo electr??nico gratis est?? prohibido.Por " +"El registro usando una direcci??n de correo electr??nico gratis est?? prohibido. Por " "favor proporciona otra direcci??n." #: models.py:188 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/locale/fr/LC_MESSAGES/django.po new/django-registration-3.1.2/src/django_registration/locale/fr/LC_MESSAGES/django.po --- old/django-registration-3.1/src/django_registration/locale/fr/LC_MESSAGES/django.po 2018-09-02 15:00:29.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/locale/fr/LC_MESSAGES/django.po 2020-09-21 09:02:57.000000000 +0200 @@ -89,3 +89,34 @@ #: .\models.py:172 msgid "registration profiles" msgstr "profils d'inscription" + +#: backends/activation/views.py:115 +msgid "The account you tried to activate has already been activated." +msgstr "Le compte que vous essayez d'activer a d??j?? ??t?? activ??." + +#: backends/activation/views.py:117 +msgid "The account you attempted to activate is invalid." +msgstr "Le compte que vous essayez d'activer n'est pas valide." + +#: backends/activation/views.py:118 +msgid "This account has expired." +msgstr "Ce compte a expir??." + +#: backends/activation/views.py:119 +msgid "The activation key you provided is invalid." +msgstr "La cl?? d'activation fournie n'est pas valide." + +#: validators.py:16 +msgid "This name cannot be registered. Please choose a different name." +msgstr "Ce nom ne peut ??tre enregistr??. Veuillez en choisir un diff??rent." + +#: validators.py:18 +msgid "" +"This email address cannot be registered. Please supply a different email " +"address." +msgstr "" +"Cette adresse courriel ne peut ??tre enregistr??e. Veuillez en indiquer une autre." + +#: validators.py:29 +msgid "This name is reserved and cannot be registered." +msgstr "Ce nom est r??serv?? et ne peut ??tre enregistr??." Binary files old/django-registration-3.1/src/django_registration/locale/ko/LC_MESSAGES/django.mo and new/django-registration-3.1.2/src/django_registration/locale/ko/LC_MESSAGES/django.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/locale/ko/LC_MESSAGES/django.po new/django-registration-3.1.2/src/django_registration/locale/ko/LC_MESSAGES/django.po --- old/django-registration-3.1/src/django_registration/locale/ko/LC_MESSAGES/django.po 2018-09-02 15:00:29.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/locale/ko/LC_MESSAGES/django.po 2021-04-01 07:00:01.000000000 +0200 @@ -8,82 +8,65 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-12 14:09-0500\n" +"POT-Creation-Date: 2020-12-18 17:55+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Young Gyu Park <ygpa...@gmail.com>\n" +"Last-Translator: Sam Kim <qur...@naver.com>\n" "Language-Team: LANGUAGE <l...@li.org>\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: admin.py:23 -msgid "Activate users" -msgstr "?????? ?????????" - -#: admin.py:43 -msgid "Re-send activation emails" -msgstr "????????? ?????????" - -#: forms.py:35 -msgid "username" -msgstr "????????? ?????????" - -#: forms.py:36 -msgid "This value must contain only letters, numbers and underscores." -msgstr "??? ????????? ??????, _, ?????? ????????? ???????????????." - -#: forms.py:39 -msgid "Email address" -msgstr "????????? ??????" - -#: forms.py:41 -msgid "Password" -msgstr "????????? ????????????" - -#: forms.py:43 -msgid "Password (again)" -msgstr "???????????? (?????????)" +#: .\backends\activation\views.py:114 +msgid "The account you tried to activate has already been activated." +msgstr "?????? ????????? ??? ???????????????." + +#: .\backends\activation\views.py:116 +msgid "The account you attempted to activate is invalid." +msgstr "???????????? ?????? ????????? ????????? ????????? ????????????." + +#: .\backends\activation\views.py:117 +msgid "This account has expired." +msgstr "??? ????????? ?????????????????????." + +#: .\backends\activation\views.py:118 +msgid "The activation key you provided is invalid." +msgstr "????????? ????????? ????????? ?????? ???????????? ????????????." -#: forms.py:55 -msgid "A user with that username already exists." -msgstr "?????? ?????? ???????????? ???????????? ???????????? ????????????." - -#: forms.py:67 -msgid "The two password fields didn't match." -msgstr "??????????????? ?????? ???????????? ????????????." - -#: forms.py:78 +#: .\forms.py:90 msgid "I have read and agree to the Terms of Service" msgstr "????????? ????????? ??? ????????? ???????????????." -#: forms.py:79 -msgid "You must agree to the terms to register" -msgstr "????????? ?????? ???????????? ?????????." +#: .\validators.py:15 +msgid "This name cannot be registered. Please choose a different name." +msgstr "??? ????????? ????????? ??? ????????????. ?????? ????????? ??????????????????." -#: forms.py:95 +#: .\validators.py:17 +msgid "" +"This email address cannot be registered. Please supply a different email " +"address." +msgstr "???????????? ????????? ??? ????????????. ?????? ???????????? ??????????????????." + +#: .\validators.py:21 msgid "" "This email address is already in use. Please supply a different email " "address." -msgstr "???????????? ?????? ??????????????????. ?????? ???????????? ????????? ?????????." +msgstr "???????????? ?????? ??????????????????. ?????? ???????????? ??????????????????." + +#: .\validators.py:23 +msgid "A user with that username already exists." +msgstr "?????? ?????? ???????????? ???????????? ???????????? ????????????." -#: forms.py:122 +#: .\validators.py:25 msgid "" "Registration using free email addresses is prohibited. Please supply a " "different email address." -msgstr "?????? ????????? ???????????? ???????????? ??? ????????????. ?????? ???????????? ????????? ?????????" +msgstr "?????? ????????? ???????????? ???????????? ??? ????????????.?????? ???????????? ????????? ?????????." -#: models.py:165 -msgid "user" -msgstr "?????????" - -#: models.py:166 -msgid "activation key" -msgstr "????????? ???" - -#: models.py:171 -msgid "registration profile" -msgstr "?????? ????????????" - -#: models.py:172 -msgid "registration profiles" -msgstr "?????? ????????????" +#: .\validators.py:28 +msgid "This name is reserved and cannot be registered." +msgstr "??? ????????? ?????? ???????????? ????????? ??? ????????????." + +#: .\validators.py:29 +msgid "You must agree to the terms to register" +msgstr "????????? ?????? ???????????? ?????????." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/migrations/0001_initial.py new/django-registration-3.1.2/src/django_registration/migrations/0001_initial.py --- old/django-registration-3.1/src/django_registration/migrations/0001_initial.py 2019-10-13 10:51:11.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/migrations/0001_initial.py 2020-12-12 08:50:04.000000000 +0100 @@ -4,7 +4,6 @@ from django.conf import settings from django.db import migrations - # django-registration 2.x included a model-based signup workflow which # needed to create a model to store data. In django-registration 3.x, # that workflow no longer exists. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/signals.py new/django-registration-3.1.2/src/django_registration/signals.py --- old/django-registration-3.1/src/django_registration/signals.py 2018-09-02 15:00:29.000000000 +0200 +++ new/django-registration-3.1.2/src/django_registration/signals.py 2020-12-12 13:22:33.000000000 +0100 @@ -5,9 +5,10 @@ from django.dispatch import Signal - # A new user has registered. -user_registered = Signal(providing_args=["user", "request"]) +# Provided args: user, request +user_registered = Signal() # A user has activated his or her account. -user_activated = Signal(providing_args=["user", "request"]) +# Provided args: user, request +user_activated = Signal() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/validators.py new/django-registration-3.1.2/src/django_registration/validators.py --- old/django-registration-3.1/src/django_registration/validators.py 2020-01-26 23:20:37.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/validators.py 2020-12-12 08:50:04.000000000 +0100 @@ -10,8 +10,7 @@ from django.core.exceptions import ValidationError from django.core.validators import EmailValidator, RegexValidator from django.utils.deconstruct import deconstructible -from django.utils.translation import ugettext_lazy as _ - +from django.utils.translation import gettext_lazy as _ CONFUSABLE = _("This name cannot be registered. " "Please choose a different name.") CONFUSABLE_EMAIL = _( @@ -244,9 +243,7 @@ # Only run if the username is a string. if not isinstance(value, str): return - value = unicodedata.normalize("NFKC", value) - if hasattr(value, "casefold"): - value = value.casefold() # pragma: no cover + value = unicodedata.normalize("NFKC", value).casefold() if self.model._default_manager.filter( **{"{}__iexact".format(self.field_name): value} ).exists(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration/views.py new/django-registration-3.1.2/src/django_registration/views.py --- old/django-registration-3.1/src/django_registration/views.py 2020-01-26 23:20:55.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration/views.py 2021-04-01 07:00:01.000000000 +0200 @@ -7,7 +7,9 @@ from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.urls import reverse_lazy -from django.utils.encoding import force_text +from django.utils.decorators import method_decorator +from django.utils.encoding import force_str +from django.views.decorators.debug import sensitive_post_parameters from django.views.generic.base import TemplateView from django.views.generic.edit import FormView @@ -15,7 +17,6 @@ from .exceptions import ActivationError from .forms import RegistrationForm - USER_MODEL_MISMATCH = """ You are attempting to use the registration view {view} with the form class {form}, @@ -41,6 +42,7 @@ success_url = None template_name = "django_registration/registration_form.html" + @method_decorator(sensitive_post_parameters()) def dispatch(self, *args, **kwargs): """ Check that user signup is allowed before even bothering to @@ -48,7 +50,7 @@ """ if not self.registration_allowed(): - return HttpResponseRedirect(force_text(self.disallowed_url)) + return HttpResponseRedirect(force_str(self.disallowed_url)) return super().dispatch(*args, **kwargs) def get_form(self, form_class=None): @@ -126,7 +128,7 @@ Return the URL to redirect to after successful redirection. """ - return force_text(self.success_url) + return force_str(self.success_url) def get(self, *args, **kwargs): """ @@ -148,9 +150,7 @@ signals.user_activated.send( sender=self.__class__, user=activated_user, request=self.request ) - return HttpResponseRedirect( - force_text(self.get_success_url(activated_user)) - ) + return HttpResponseRedirect(force_str(self.get_success_url(activated_user))) context_data = self.get_context_data() context_data.update(extra_context) return self.render_to_response(context_data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/src/django_registration.egg-info/PKG-INFO new/django-registration-3.1.2/src/django_registration.egg-info/PKG-INFO --- old/django-registration-3.1/src/django_registration.egg-info/PKG-INFO 2020-01-27 00:20:29.000000000 +0100 +++ new/django-registration-3.1.2/src/django_registration.egg-info/PKG-INFO 2021-04-01 07:04:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: django-registration -Version: 3.1 +Version: 3.1.2 Summary: An extensible user-registration application for Django Home-page: https://github.com/ubernostrum/django-registration/ Author: James Bennett @@ -8,15 +8,16 @@ License: UNKNOWN Description: .. -*-restructuredtext-*- - .. image:: https://travis-ci.org/ubernostrum/django-registration.svg?branch=master - :target: https://travis-ci.org/ubernostrum/django-registration + .. image:: https://github.com/ubernostrum/django-registration/workflows/CI/badge.svg + :alt: CI status image + :target: https://github.com/ubernostrum/django-registration/actions?query=workflow%3ACI This is a user-registration application for `Django <https://www.djangoproject.com/>`_. There are two registration workflows (one-step, and two-step with activation) built in, and it's designed to be extensible and support building additional workflows. - Full documentation is `available online + To get started, check out `the documentation <https://django-registration.readthedocs.io/>`_. Platform: UNKNOWN @@ -25,6 +26,7 @@ Classifier: Framework :: Django Classifier: Framework :: Django :: 2.2 Classifier: Framework :: Django :: 3.0 +Classifier: Framework :: Django :: 3.1 Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/tests/test_activation_workflow.py new/django-registration-3.1.2/tests/test_activation_workflow.py --- old/django-registration-3.1/tests/test_activation_workflow.py 2020-01-05 11:55:41.000000000 +0100 +++ new/django-registration-3.1.2/tests/test_activation_workflow.py 2020-09-21 09:27:26.000000000 +0200 @@ -177,7 +177,8 @@ try: time.time = lambda: expired_timestamp activation_key = signing.dumps( - obj=self.valid_data[user_model.USERNAME_FIELD], salt=REGISTRATION_SALT, + obj=self.valid_data[user_model.USERNAME_FIELD], + salt=REGISTRATION_SALT, ) finally: time.time = _old_time diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/tests/test_forms.py new/django-registration-3.1.2/tests/test_forms.py --- old/django-registration-3.1/tests/test_forms.py 2020-01-05 11:29:17.000000000 +0100 +++ new/django-registration-3.1.2/tests/test_forms.py 2020-09-21 09:27:16.000000000 +0200 @@ -218,7 +218,9 @@ """ user_model = get_user_model() validator = validators.CaseInsensitiveUnique( - user_model, user_model.USERNAME_FIELD, validators.DUPLICATE_USERNAME, + user_model, + user_model.USERNAME_FIELD, + validators.DUPLICATE_USERNAME, ) for value in (123456, 1.7, uuid.uuid4()): self.assertTrue(validator(value) is None) @@ -251,10 +253,14 @@ """ user_model = get_user_model() validator = validators.CaseInsensitiveUnique( - user_model, user_model.USERNAME_FIELD, validators.DUPLICATE_USERNAME, + user_model, + user_model.USERNAME_FIELD, + validators.DUPLICATE_USERNAME, ) validator_same = validators.CaseInsensitiveUnique( - user_model, user_model.USERNAME_FIELD, validators.DUPLICATE_USERNAME, + user_model, + user_model.USERNAME_FIELD, + validators.DUPLICATE_USERNAME, ) self.assertTrue(validator.__eq__(validator_same)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/tests/test_views.py new/django-registration-3.1.2/tests/test_views.py --- old/django-registration-3.1/tests/test_views.py 2020-01-13 10:19:16.000000000 +0100 +++ new/django-registration-3.1.2/tests/test_views.py 2021-04-01 07:00:01.000000000 +0200 @@ -3,10 +3,14 @@ """ +import logging +import sys + from django.contrib.auth import get_user_model -from django.core import signing +from django.contrib.auth.models import AnonymousUser +from django.core import mail, signing from django.core.exceptions import ImproperlyConfigured -from django.test import override_settings +from django.test import RequestFactory, override_settings from django.urls import reverse from django_registration import forms @@ -86,3 +90,69 @@ ) with self.assertRaisesMessage(ImproperlyConfigured, message): view.get_form() + + +class RegistrationError(Exception): + """ + Distinct exception class to simulate an unhandled error in the below + tests. + + """ + + +class BuggyRegistrationView(base_views.RegistrationView): + """ + Registration view that simulates an unhandled exception. + + """ + + def registration_allowed(self): + raise RegistrationError("catch me if you can") + + +buggy_view = BuggyRegistrationView.as_view() + + +@override_settings(ADMINS=[("Admin", "admin@localhost")]) +class SensitiveParameterFilterTests(RegistrationTestCase): + """ + Test filtering of sensitive POST parameters in error reports for the + registration view. + + """ + + logger = logging.getLogger("django") + factory = RequestFactory() + + def test_sensitive_post_parameters_are_filtered(self): + """ + When an unexpected exception occurs during a POST request to the + registration view, the default email report to ADMINS must not + contain the submitted passwords. + + """ + request = self.factory.post("/raise/", data=self.valid_data) + request.user = AnonymousUser() + # we cannot use self.assertRaises(...) here because of sys.exc_info() + try: + buggy_view(request) + self.fail("expected exception not thrown") + except RegistrationError as error: + self.assertEqual(str(error), "catch me if you can") + # based on code in Django (tests/view_tests/views.py) + self.logger.error( + "Internal Server Error: %s" % request.path, + exc_info=sys.exc_info(), + extra={"status_code": 500, "request": request}, + ) + self.assertEqual(len(mail.outbox), 1) + email = mail.outbox[0] + self.assertIn("RegistrationError at /raise/", email.body) + self.assertIn("catch me if you can", email.body) + self.assertIn("No GET data", email.body) + self.assertNotIn("No POST data", email.body) + self.assertIn("password1", email.body) + self.assertIn("password2", email.body) + self.assertNotIn(self.valid_data["password1"], email.body) + self.assertNotIn(self.valid_data["password2"], email.body) + self.assertNotIn(self.valid_data["email"], email.body) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/tests/urls/view_tests.py new/django-registration-3.1.2/tests/urls/view_tests.py --- old/django-registration-3.1/tests/urls/view_tests.py 2020-01-05 11:37:54.000000000 +0100 +++ new/django-registration-3.1.2/tests/urls/view_tests.py 2020-12-12 08:50:04.000000000 +0100 @@ -13,7 +13,6 @@ from ..views import ActivateWithComplexRedirect - urlpatterns = [ path( "", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/django-registration-3.1/tox.ini new/django-registration-3.1.2/tox.ini --- old/django-registration-3.1/tox.ini 2020-01-21 15:00:40.000000000 +0100 +++ new/django-registration-3.1.2/tox.ini 2020-12-12 10:47:28.000000000 +0100 @@ -1,107 +1,188 @@ -# Tox (https://tox.readthedocs.io/) is a tool for running tests in -# multiple virtualenvs. This configuration file will run the test -# suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. +# This is a configuration file for running tests, linters and other +# code-quality checks, using Tox (https://tox.readthedocs.io/), which +# allows configuring and automatically running many different test +# environments and checks, each in a separate Python virtual +# environment (and each potentially using a different version of +# Python). +# +# Using this file requires having tox installed -- "pip install tox" +# or refer to Tox's own documentation -- and a functioning +# installation of at least one targeted Python version. Running "tox" +# with no command-line arguments will attempt to run all environments +# against all targeted Python versions, and will fail if any Python +# versions are missing. To select only certain test environments to +# run, use the "-e" command-line flag and pass either a single +# environment name, or a comma-separated list of environment names. To +# see all available environments with their descriptions, run: +# "tox -v 1 --listenvs" + +# Base configuration: list of environments and Python versions. +################################################################################ + +# Environment matrix. [tox] envlist = - {py35}-django{22} - {py36,py37,py38}-django{22,30} + py{36,37,38,39}-django{22,30,31} black + check-description + check-manifest docs flake8 isort - mypy spelling -[cleanup] -commands = +# Configuration for running on GitHub Actions via tox-gh-actions. +[gh-actions] +python = + 3.6: py36 + 3.7: py37 + 3.8: py38 + 3.9: py39, black, check-description, check-manifest, docs, flake8, isort, spelling + + +# The base test environment -- runs the unit test suite with coverage. +################################################################################ +[testenv] +description = Run tests with coverage report. +allowlist_externals = + find + rm +# Python silences deprecation warnings by default, but we want to see +# them during test runs. +setenv = + PYTHONWARNINGS=once::DeprecationWarning +# Ensure each virtualenv always has latest pip, so output doesn't get +# cluttered with messages about needing to upgrade it. Note that tox's +# 'download=true' option doesn't quite do the same thing: it ensures +# pip/setuptools/wheel get upgraded at virtualenv creation time, but +# will not upgrade them when reusing an already-created virtualenv. +commands_pre = + {envpython} -m pip install --upgrade pip +# Many test runs will leave behind some type of artifact -- Python +# bytecode, packaging-related files, coverage data -- which should be +# removed before the next run in order to ensure a clean starting +# point. The commands below run after the main test commands of each +# virtualenv, and perform this cleanup. +commands_post = find {toxinidir}/tests -type f -name "*.pyc" -delete find {toxinidir}/tests -type d -name "__pycache__" -delete find {toxinidir}/src -type f -name "*.pyc" -delete find {toxinidir}/src -type d -name "__pycache__" -delete find {toxinidir}/src -type f -path "*.egg-info*" -delete find {toxinidir}/src -type d -path "*.egg-info" -delete - -[pipupgrade] + rm -f {toxinidir}/.coverage commands = - python -m pip install --upgrade pip + coverage run --source django_registration runtests.py + coverage report -m +deps = + coverage + django22: Django>=2.2,<3.0 + django30: Django>=3.0,<3.1 + django31: Django>=3.1,<3.2 -[testenv:black] -basepython = python3.8 -changedir = {toxinidir} -deps = black -commands = - {[pipupgrade]commands} - black --line-length 88 --check --diff {toxinidir}/src/django_registration {toxinidir}/tests {toxinidir}/docs {toxinidir} - {[cleanup]commands} +# Documentation checks. +################################################################################ + +# Runs an HTML build of the documentation, and fails if there's an +# error in building it. [testenv:docs] +description = Check that the documentation can build. +basepython = python3.9 changedir = {toxinidir}/docs commands = - {[pipupgrade]commands} sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html - {[cleanup]commands} deps = sphinx sphinx_rtd_theme +# Runs a spelling checker over the documentation, and if misspelled +# words are found, fails the build and outputs a list of +# them. Requires the 'enchant' C library preinstalled on the target +# system. [testenv:spelling] +description = Spell-check documentation. +basepython = python3.9 changedir = {toxinidir}/docs +# This is the only env where we silence deprecation warnings, because +# we'd already catch any from our actual codebase elsewhere and in +# this env we are asking Sphinx to promote warnings to errors in order +# to fail the build on anything caught by the spelling checker. +setenv = + PYTHONWARNINGS=ignore::DeprecationWarning commands = - {[pipupgrade]commands} - sphinx-build -b spelling -d {envtmpdir}/doctrees . {envtmpdir}/html - {[cleanup]commands} + sphinx-build -W -b spelling -d {envtmpdir}/doctrees . {envtmpdir}/html deps = sphinx sphinx_rtd_theme pyenchant sphinxcontrib-spelling + +# Linters. +################################################################################ + +# Runs the Black code formatter over the entire code base, and fails +# if Black thinks any files need to be reformatted. +[testenv:black] +description = Check code formatting using Black. +basepython = python3.9 +changedir = {toxinidir} +deps = black +commands = + black --line-length 88 --check --diff {toxinidir}/src/django_registration {toxinidir}/tests {toxinidir}/docs {toxinidir} + +# Runs the flake8 linter over the entire code base, and fails if +# flake8 finds any problems. [testenv:flake8] +description = Lint code with flake8. +basepython = python3.9 changedir = {toxinidir} deps = flake8 commands = - {[pipupgrade]commands} flake8 {toxinidir}/src/django_registration {toxinidir}/tests - {[cleanup]commands} +# Runs the isort import linter over the entire code base, and fails if +# any problems are found. [testenv:isort] +description = Lint imports with isort. +basepython = python3.9 changedir = {toxinidir} deps = isort commands = - {[pipupgrade]commands} - isort --recursive --check-only --diff {toxinidir}/src/django_registration {toxinidir}/tests - {[cleanup]commands} + isort --check-only --diff {toxinidir}/src/django_registration {toxinidir}/tests -[testenv:mypy] -basepython = python3.8 -changedir = {toxinidir} -deps = mypy -commands = - {[pipupgrade]commands} - mypy --ignore-missing-imports {toxinidir}/src/django_registration {toxinidir}/tests - {[cleanup]commands} -[testenv] -whitelist_externals = - find - rm -setenv = - PYTHONWARNINGS=once::DeprecationWarning -commands = - {[pipupgrade]commands} - coverage run --source django_registration runtests.py - coverage report -m - {[cleanup]commands} -deps = - coverage - django22: Django>=2.2,<3.0 - django30: Django>=3.0,<3.1 +# Packaging checks. +################################################################################ -[travis] -python = - 3.5: py35 - 3.6: py36 - 3.7: py37, - 3.8: py38, black, docs, flake8, isort, mypy, spelling +# Builds the package and runs 'twine check' to ensure it will render +# correctly when uploaded to the Python Package Index, or fail if not. +[testenv:check-description] +description = Check that the package description will render on the Python Package Index. +basepython = python3.9 +changedir = {toxinidir} +skip_install = true +deps = + twine +# In this environment we always want latest wheel in addition to +# latest pip. +commands_pre = + {envpython} -m pip install --upgrade pip setuptools wheel +commands = + {envpython} -m pip wheel -w {envtmpdir}/build --no-deps . + twine check {envtmpdir}/build/* + +# Runs check-manifest, a tool that builds the package and compares the +# files in the package to the files under version control, and fails +# if any version-controlled files do not end up in the package. +[testenv:check-manifest] +description = Check that the set of packaged files matches the set of version-controlled files. +basepython = python3.9 +changedir = {toxinidir} +skip_install = true +deps = + check-manifest +commands = + check-manifest --verbose