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 uppercase transformation #935

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

blotus
Copy link
Contributor

@blotus blotus commented Dec 8, 2023

The documentation mentions an uppercase transformation (https://coraza.io/docs/seclang/transformations/#uppercase), but it's not actually implemented in coraza.

This PR adds it.

@blotus blotus requested a review from a team as a code owner December 8, 2023 13:32
Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (93593ff) 82.58% compared to head (2ae6918) 82.59%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #935      +/-   ##
==========================================
+ Coverage   82.58%   82.59%   +0.01%     
==========================================
  Files         160      161       +1     
  Lines        8991     8997       +6     
==========================================
+ Hits         7425     7431       +6     
  Misses       1317     1317              
  Partials      249      249              
Flag Coverage Δ
default 77.68% <100.00%> (+0.01%) ⬆️
examples 26.59% <16.66%> (-0.01%) ⬇️
ftw 47.01% <16.66%> (-0.03%) ⬇️
ftw-multiphase 49.21% <16.66%> (-0.03%) ⬇️
tinygo 75.21% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jcchavezs jcchavezs requested a review from anuraaga December 8, 2023 13:43
@fzipi
Copy link
Member

fzipi commented Dec 8, 2023

Thanks for your contribution!

LGTM. Unless @anuraaga has other opinions, it's good to merge.

@jptosso
Copy link
Member

jptosso commented Dec 11, 2023

LGTM, but to keep testing consistency, can you also add the tests to internal/transformations/testadata?

https://github.com/corazawaf/coraza/blob/main/internal/transformations/testdata/lowercase.json

Thank you very much for your contribution.

@fzipi fzipi changed the title Add uppercase transformation feat: add uppercase transformation Dec 18, 2023
Copy link
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

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

Thanks, merging now!

@fzipi fzipi merged commit 3b532a6 into corazawaf:main Dec 18, 2023
10 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