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

fix: argon2id configuration override #96

Merged
merged 2 commits into from
Apr 17, 2023
Merged

fix: argon2id configuration override #96

merged 2 commits into from
Apr 17, 2023

Conversation

devhaozi
Copy link
Member

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Patch coverage: 88.88% and project coverage change: +0.02 🎉

Comparison is base (eb2ef23) 51.52% compared to head (beb8d83) 51.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      goravel/framework#96      +/-   ##
==========================================
+ Coverage   51.52%   51.55%   +0.02%     
==========================================
  Files         103      103              
  Lines        7028     7032       +4     
==========================================
+ Hits         3621     3625       +4     
  Misses       3126     3126              
  Partials      281      281              
Impacted Files Coverage Δ
hash/argon2id.go 82.85% <88.88%> (+1.03%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

Great! By the way, could we add a unit test to cover the issue?

@devhaozi
Copy link
Member Author

Great! By the way, could we add a unit test to cover the issue?

Add it.

@devhaozi devhaozi requested a review from hwbrzzl April 17, 2023 02:53
@@ -59,6 +59,12 @@ func (s *ApplicationTestSuite) TestCheckHash() {
}
}

func (s *ApplicationTestSuite) TestConfigurationOverride() {
value := "$argon2id$v=19$m=65536,t=8,p=1$NlVjQm5PQUdWTHVTM1RBUg$Q5T7WfeCI7ucIdk6Na6AdQ"
Copy link
Contributor

Choose a reason for hiding this comment

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

我们可以根据你自定义配置的发生问题的过程生成这个加密串么?而不是固定写死,这样测试是不是不太能覆盖到问题?

Copy link
Member Author

@devhaozi devhaozi Apr 17, 2023

Choose a reason for hiding this comment

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

我们可以根据你自定义配置的发生问题的过程生成这个加密串么?而不是固定写死,这样测试是不是不太能覆盖到问题?

问题的哈希是从数据库取出来的,因为是其他程序生成的,所以参数不一样。

Copy link
Contributor

@hwbrzzl hwbrzzl left a comment

Choose a reason for hiding this comment

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

LGTM

@hwbrzzl hwbrzzl merged commit b37b9bd into goravel:master Apr 17, 2023
@devhaozi devhaozi deleted the fix-argon2id branch April 17, 2023 03:29
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.

🐛 [Bug] argon2id参数设置无效
2 participants