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

Refactoring towards 2.0 #1

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Refactoring towards 2.0 #1

wants to merge 10 commits into from

Conversation

wargio
Copy link
Owner

@wargio wargio commented Mar 6, 2022

The purpose of this branch is to rework over naxsi source code, rewrite it and provide libnaxsi for development and an apache module.

wargio and others added 10 commits March 5, 2022 13:56
* Setup json scanning to allow for arrays as the parent type

* rather than assuming an object, just validate any json value

* keep as close to the original as possible

* Since all the validation comes within val we don't need to increment off. Initial tests seemed to work

* Fix formatting issue
* Changes to strncpy() to remove compile warnings with Ubuntu 20.04 LTS. Source is controlled, so no need for strncpy()

Tested with Nginx-1.18.0 and NAXSI-0.56

* Fix. Strcpy would add a terminating null character. Changes to memcpy()
…ile opening. (#507)

* Added CIDR to whitelist (IP and CIDRs are allowed).
* Bug while sometimes opening the file and sometims not (!). Weird NGINX behavior.
* Bug with WhitelistFile. If it wasn't there and specified or/not specified in Confing, Naxsi would segfault.

* Tests for WhitelistFile option
The content should be well formed JSON and it will make NAXSI not complain about Unknown Format.
Can help many other users.
@wargio wargio force-pushed the refactoring-1.4 branch 3 times, most recently from 6460ec4 to d0a1b9c Compare March 9, 2022 16:20
@wargio wargio changed the title Refactoring towards 1.4 Refactoring towards 1.5 Jul 14, 2022
@wargio wargio changed the title Refactoring towards 1.5 Refactoring towards 2.0 Mar 15, 2024
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