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

Cannot change password when maxPasswordHistory is 1 #5191

Merged
merged 3 commits into from
Apr 10, 2019

Conversation

Tolsee
Copy link
Contributor

@Tolsee Tolsee commented Nov 24, 2018

#4918

Change this.config.passwordPolicy.maxPasswordHistory - 2 to equal 0 when 0 or -ve, same value when positive.

So, while loop will terminate.

@codecov
Copy link

codecov bot commented Nov 24, 2018

Codecov Report

Merging #5191 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5191      +/-   ##
==========================================
+ Coverage   93.93%   93.97%   +0.03%     
==========================================
  Files         123      124       +1     
  Lines        8975     9050      +75     
==========================================
+ Hits         8431     8505      +74     
- Misses        544      545       +1
Impacted Files Coverage Δ
src/RestWrite.js 92.89% <ø> (-0.36%) ⬇️
src/Adapters/Auth/facebook.js 76.47% <0%> (-3.53%) ⬇️
src/ParseServer.js 96.29% <0%> (-0.46%) ⬇️
src/RestQuery.js 96% <0%> (-0.11%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.08% <0%> (-0.08%) ⬇️
src/Options/Definitions.js 100% <0%> (ø) ⬆️
src/rest.js 98.85% <0%> (ø) ⬆️
...rc/Adapters/Storage/Mongo/MongoSchemaCollection.js 95.29% <0%> (ø) ⬆️
src/Adapters/Cache/RedisCacheAdapter.js
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d7b992...d566adf. Read the comment docs.

Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

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

Can you add a test please?

@flovilmart
Copy link
Contributor

Thanks for the PR, can you add a test please so we do not introduce unwanted regressions?

@Tolsee
Copy link
Contributor Author

Tolsee commented Nov 25, 2018

@paulovitin @flovilmart
Is the same test but with the case of valid reset password will be right thing here?

@paulovitin pointed out the case covered here, but It seems that when the password is invalid then we will not rich the problem.

Your help will be greatly appreciated 😀

https://github.com/parse-community/parse-server/blob/master/spec/PasswordPolicy.spec.js#L1405-L1407

@stale
Copy link

stale bot commented Feb 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 13, 2019
@flovilmart
Copy link
Contributor

cc @Tolsee do you think you can add a test please?

@stale stale bot removed the wontfix label Feb 13, 2019
@dplewis dplewis requested a review from acinader April 3, 2019 17:20
@dplewis
Copy link
Member

dplewis commented Apr 3, 2019

@acinader The issue here is that new users have a password history of 0 initially which causes an infinite loop. Failing test has been added

@acinader acinader merged commit a3746ca into parse-community:master Apr 10, 2019
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
…5191)

* Negitive to zero and positive to same value

* add failing test
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.

4 participants