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

Fixed waf rules reload #219

Merged
merged 1 commit into from
Nov 29, 2021
Merged

Fixed waf rules reload #219

merged 1 commit into from
Nov 29, 2021

Conversation

bmuddha
Copy link
Contributor

@bmuddha bmuddha commented Nov 23, 2021

The problem was that invocation of load_from_function didn't overwrite
the previouse state of Lua, so no new rules were loaded

@polachok
Copy link
Collaborator

There's unload in mlua now: https://github.com/khvzak/mlua/commits/dev

The problem was that invocation of `load_from_function` didn't overwrite
the previouse state of Lua, so no new rules were loaded. Fix adds new
`unload` method call on lua state, to remove old function, before
loading a new one.
@bmuddha
Copy link
Contributor Author

bmuddha commented Nov 24, 2021

Thanks, rewrote WAF rules reloading using new this new method for Lua state, works as expected 👍

@bmuddha bmuddha merged commit 5551c09 into bestarch-ae:master Nov 29, 2021
@polachok
Copy link
Collaborator

It's included in mlua 0.7.0: https://docs.rs/mlua/latest/mlua/struct.Lua.html#method.unload

@bmuddha
Copy link
Contributor Author

bmuddha commented Nov 29, 2021

Thanks, I'll remove patch before next release

@bmuddha bmuddha deleted the hot-fix-waf-reload branch February 10, 2022 08:28
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.

2 participants