-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: Products.PasswordResetTool
Branch: refs/heads/master Date: 2018-03-02T08:31:26+01:00 Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> Commit: plone/Products.PasswordResetTool@d6d8285 1. rstrip cleaner added in password reset action for userid Files changed: M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy Repository: Products.PasswordResetTool Branch: refs/heads/master Date: 2018-03-02T11:49:02+01:00 Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> Commit: plone/Products.PasswordResetTool@8bc6012 1. rstrip is replaced with `strip` so that both side cleaning works Files changed: M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy Repository: Products.PasswordResetTool Branch: refs/heads/master Date: 2018-03-02T12:10:45+01:00 Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> Commit: plone/Products.PasswordResetTool@4a330f5 1. userid striping keep outside of try except Files changed: M CHANGES.rst M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy Repository: Products.PasswordResetTool Branch: refs/heads/master Date: 2018-03-02T14:12:23+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.PasswordResetTool@1592481 Merge pull request #14 from nazrulworld/master userid is cleaned by rstrip during password reset submission Files changed: M CHANGES.rst M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy
- Loading branch information
1 parent
8505484
commit dd116fb
Showing
1 changed file
with
136 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,147 @@ | ||
Repository: plone.api | ||
Repository: Products.PasswordResetTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-02-20T23:37:48+05:30 | ||
Author: Nilesh (nileshgulia1) <nileshgulia@gmail.com> | ||
Commit: https://github.com/plone/plone.api/commit/3eeefe63b3a2d33b67c150b9fb101e7e09a9d4f7 | ||
Date: 2018-03-02T08:31:26+01:00 | ||
Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> | ||
Commit: https://github.com/plone/Products.PasswordResetTool/commit/d6d8285ca497fa5cfb7ebb490bcb38d012619717 | ||
|
||
Update conventions.rst | ||
1. rstrip cleaner added in password reset action for userid | ||
|
||
Files changed: | ||
M docs/contribute/conventions.rst | ||
M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
|
||
diff --git a/docs/contribute/conventions.rst b/docs/contribute/conventions.rst | ||
index e0a7925..196d8c7 100644 | ||
--- a/docs/contribute/conventions.rst | ||
+++ b/docs/contribute/conventions.rst | ||
@@ -1,4 +1,4 @@ | ||
.. note:: | ||
diff --git a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
index 56b568c..930069a 100644 | ||
--- a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
+++ b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
@@ -12,6 +12,8 @@ from Products.PasswordResetTool.PasswordResetTool import InvalidRequestError, Ex | ||
status = "success" | ||
pw_tool = getToolByName(context, 'portal_password_reset') | ||
try: | ||
+ # sanitization | ||
+ userid = userid.rstrip() | ||
pw_tool.resetPassword(userid, randomstring, password) | ||
except ExpiredRequestError: | ||
status = "expired" | ||
|
||
|
||
Repository: Products.PasswordResetTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-03-02T11:49:02+01:00 | ||
Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> | ||
Commit: https://github.com/plone/Products.PasswordResetTool/commit/8bc6012ec20b40d3b60862bea4677736a29c632c | ||
|
||
1. rstrip is replaced with `strip` so that both side cleaning works | ||
|
||
Files changed: | ||
M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
|
||
diff --git a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
index 930069a..d9ae1d3 100644 | ||
--- a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
+++ b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
@@ -13,7 +13,7 @@ status = "success" | ||
pw_tool = getToolByName(context, 'portal_password_reset') | ||
try: | ||
# sanitization | ||
- userid = userid.rstrip() | ||
+ userid = userid.strip() | ||
pw_tool.resetPassword(userid, randomstring, password) | ||
except ExpiredRequestError: | ||
status = "expired" | ||
|
||
|
||
Repository: Products.PasswordResetTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-03-02T12:10:45+01:00 | ||
Author: Md Nazrul Islam (nazrulworld) <connect2nazrul@gmail.com> | ||
Commit: https://github.com/plone/Products.PasswordResetTool/commit/4a330f5bf396e03bd214ef75f6bb5bcf28a049dd | ||
|
||
1. userid striping keep outside of try except | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 7b11e98..21cc941 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -14,7 +14,8 @@ New features: | ||
|
||
Bug fixes: | ||
|
||
-- *add item here* | ||
+- Sanitize `userid` that is coming from password reset form. That will be prevent error if user unintentionally provides username/email with whitespace. | ||
+ [nazrulworld] | ||
|
||
|
||
2.2.3 (2016-08-18) | ||
diff --git a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
index d9ae1d3..bc1391d 100644 | ||
--- a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
+++ b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
@@ -11,9 +11,9 @@ from Products.PasswordResetTool.PasswordResetTool import InvalidRequestError, Ex | ||
|
||
status = "success" | ||
pw_tool = getToolByName(context, 'portal_password_reset') | ||
+# sanitization | ||
+userid = userid.strip() | ||
try: | ||
- # sanitization | ||
- userid = userid.strip() | ||
pw_tool.resetPassword(userid, randomstring, password) | ||
except ExpiredRequestError: | ||
status = "expired" | ||
|
||
|
||
Repository: Products.PasswordResetTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2018-03-02T14:12:23+01:00 | ||
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> | ||
Commit: https://github.com/plone/Products.PasswordResetTool/commit/1592481a5fc3efe7a440ab046b56e476c42d3dfd | ||
|
||
Merge pull request #14 from nazrulworld/master | ||
|
||
userid is cleaned by rstrip during password reset submission | ||
|
||
Files changed: | ||
M CHANGES.rst | ||
M Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
|
||
diff --git a/CHANGES.rst b/CHANGES.rst | ||
index 7b11e98..21cc941 100644 | ||
--- a/CHANGES.rst | ||
+++ b/CHANGES.rst | ||
@@ -14,7 +14,8 @@ New features: | ||
|
||
Bug fixes: | ||
|
||
-- *add item here* | ||
+- Sanitize `userid` that is coming from password reset form. That will be prevent error if user unintentionally provides username/email with whitespace. | ||
+ [nazrulworld] | ||
|
||
|
||
- This documentation was moved to the `styleguide section on docs.plone.org <http://docs.plone.org/develop/styleguide/>`_, to the `Working with Dit and GitHub <http://docs.plone.org/develop/coredev/docs/git.html>`_ and to the :doc:`develop` chapter of the plone.api documentation. | ||
+ This documentation was moved to the `styleguide section on docs.plone.org <http://docs.plone.org/develop/styleguide/>`_, to the `Working with Git and GitHub <http://docs.plone.org/develop/coredev/docs/git.html>`_ and to the :doc:`develop` chapter of the plone.api documentation. | ||
2.2.3 (2016-08-18) | ||
diff --git a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
index 56b568c..bc1391d 100644 | ||
--- a/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
+++ b/Products/PasswordResetTool/skins/PasswordReset/pwreset_action.cpy | ||
@@ -11,6 +11,8 @@ from Products.PasswordResetTool.PasswordResetTool import InvalidRequestError, Ex | ||
|
||
status = "success" | ||
pw_tool = getToolByName(context, 'portal_password_reset') | ||
+# sanitization | ||
+userid = userid.strip() | ||
try: | ||
pw_tool.resetPassword(userid, randomstring, password) | ||
except ExpiredRequestError: | ||
|
||
|