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

bugfix: might get previous nextupdate value #466

Merged
merged 3 commits into from
May 8, 2024

Conversation

ssdr
Copy link
Contributor

@ssdr ssdr commented May 7, 2024

For the ocsp response without nextUpdate value, it will get the previous nextUpdate value which is cached in the module-level lua ffi variable, this is not what we expected.

Maybe we should use function-level local variable instead?

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-resty-core project.

@ssdr
Copy link
Contributor Author

ssdr commented May 7, 2024

commit related: 7a6521d

@ssdr ssdr changed the title bugfix: might get previouse nextupdate value bugfix: might get previous nextupdate value May 7, 2024
@Appla
Copy link

Appla commented May 7, 2024

How about resetting next_update_p by next_update_p[0] = 0 when next_update != 0 before return next_update?

@ssdr
Copy link
Contributor Author

ssdr commented May 7, 2024

How about resetting next_update_p by next_update_p[0] = 0 when next_update != 0 before return next_update?

yes, it seems better.

lib/ngx/ocsp.lua Outdated Show resolved Hide resolved
lib/ngx/ocsp.lua Outdated Show resolved Hide resolved
@zhuizhuhaomeng zhuizhuhaomeng merged commit f9add68 into openresty:master May 8, 2024
3 checks passed
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.

3 participants