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

feat: add coraza_add_get_args to expose tx.AddGetRequestArgument #34

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

potats0
Copy link
Contributor

@potats0 potats0 commented Jul 18, 2023

in libcoraza, we can't add http args. Now we only add http args by ProcessURI. But in ProcessURI func docs, it says that This function won't add GET arguments, they must be added with AddArgument.

therefore, I opened a PR to expose AddGetRequestArgument.

@potats0
Copy link
Contributor Author

potats0 commented Jul 18, 2023

ping @jcchavezs @jptosso @fzipi

@jcchavezs
Copy link
Member

can we add unit tests for this?

@potats0
Copy link
Contributor Author

potats0 commented Jul 18, 2023

can we add unit tests for this?

sorry I couldn't add unit test.because libcoraza is another repo and couldn't access the corazawaf transaction.variables. I couldn't access the variable of transaction in libcoraza unless use reflection.

@jptosso
Copy link
Member

jptosso commented Jul 18, 2023

can we add unit tests for this?

sorry I couldn't add unit test.because libcoraza is another repo and couldn't access the corazawaf transaction.variables. I couldn't access the variable of transaction in libcoraza unless use reflection.

There is a way to access Coraza transaction Variables, try:

txi := tx.(plugintypes.TransactionState)
argsGet := txi.Variables().ArgsGet()

@potats0
Copy link
Contributor Author

potats0 commented Jul 18, 2023

Thanks for helping, later i will add unit test for this

@potats0
Copy link
Contributor Author

potats0 commented Jul 20, 2023

ping @jcchavezs @jptosso

@potats0
Copy link
Contributor Author

potats0 commented Jul 21, 2023

Did anyone review my PR ?

@jcchavezs jcchavezs merged commit 994164a into corazawaf:master Jul 28, 2023
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