Commit graph

5789 commits

Author SHA1 Message Date
Adam Warner
56eae4afbe
Allow TLD blocking using ABP style (#5240) 2023-03-29 21:48:15 +01:00
RD WebDesign
66bfa606a7
Using a better text for the comment
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-29 14:17:41 -03:00
RD WebDesign
32fb2e69ff
Spliting the regex into TLD_pattern and subdomain_pattern
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-29 00:05:01 -03:00
RD WebDesign
c71460e4b6
Allow TLD blocking using ABP style
This validates patterns without dots (only for abp style), allowing TLDs to be blocked

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-28 17:21:50 -03:00
Dan Schaper
d885e92674
Hotfix Core v5.16.2 (#5235) 2023-03-25 12:02:26 -07:00
Dan Schaper
9d4a69c1d0
Fix for gravity's unchecked resource consumption. (#5234) 2023-03-25 11:39:49 -07:00
Adam Warner
0656ceb149
Speed things up a bit with some humble greps. Consolodate regexes and remove the need for so many mapfile/arrays
Signed-off-by: Adam Warner <me@adamwarner.co.uk>

Use temp files for parsing and remove when done.

Always rm the non-domains temp file.

exit 1 if gravity database creation fails.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net>
Co-authored-by: DL6ER <dl6er@dl6er.de>
Co-authored-by: Adam Warner <me@adamwarner.co.uk>
2023-03-25 11:19:23 -07:00
dependabot[bot]
95b12bad34
Bump actions/stale from 7.0.0 to 8.0.0
Bumps [actions/stale](https://github.com/actions/stale) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7.0.0...v8.0.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-25 10:56:35 +00:00
ipitio
fa116389c2
remove old comments
Signed-off-by: ipitio <21136719+ipitio@users.noreply.github.com>
2023-03-23 01:23:35 +00:00
Adam Warner
8ca5788561
Release v5.16.1 (#5226) 2023-03-22 22:19:00 +00:00
Adam Warner
1dc33129e5
Fix getting 'privacylevel' (#5224) 2023-03-22 22:11:50 +00:00
Christian König
c96463bda2
Fix getting 'privacylevel'
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-03-22 23:00:10 +01:00
Dan Schaper
edbaf6d697
Revert "Ignore commented lines when reading PRIVACYLEVEL from config file" (#5223) 2023-03-22 14:59:09 -07:00
Adam Warner
58275ecd13
Revert "Ignore commented lines when reading PRIVACYLEVEL from config file" 2023-03-22 21:52:39 +00:00
Adam Warner
c6d1137eb0
Release v5.16 (#5220) 2023-03-22 21:33:03 +00:00
Dan Schaper
fb032ea6e7
Ignore commented lines when reading PRIVACYLEVEL from config file (#5177) 2023-03-22 12:23:40 -07:00
Dan Schaper
536b3497c9
Remove ftl systemd service and optionally service override files in uninstall script (#5183) 2023-03-22 12:07:55 -07:00
Dan Schaper
8f09a1d837
Add configurable GRAVITY_TMPDIR variable into setupVars (#5216) 2023-03-22 12:05:22 -07:00
Dan Schaper
c255082ef5
Declaring all local variables under the function declaration line (#5219) 2023-03-22 11:01:52 -07:00
kot0dama
76b7453f90
Add configurable GRAVITY_TMPDIR variable into setupVars
Signed-off-by: Loïc Gomez <89980752+kot0dama@users.noreply.github.com>
2023-03-22 19:40:24 +09:00
RD WebDesign
66ed7c9ea3
Declaring all local variables under the function declaration line
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-21 16:34:50 -03:00
Adam Warner
ac2f13adef
Allow pihole -q to match subdomains using ABP style domains (#5210) 2023-03-21 15:39:11 +00:00
RD WebDesign
6b919f3a2e
Removing unnecessary commas
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-21 12:27:20 -03:00
Adam Warner
4d21bae669
Fix addKey to handle substrings of existing keys (#5211) 2023-03-21 12:31:01 +00:00
yubiuser
7ea0bbb85c
Bump tox from 4.4.6 to 4.4.7 in /test (#5215) 2023-03-18 13:58:43 +01:00
yubiuser
3ddec99f4a
Bump pytest-xdist from 3.2.0 to 3.2.1 in /test (#5214) 2023-03-18 13:57:49 +01:00
yubiuser
e1f12668fa
Bump actions/checkout from 3.3.0 to 3.4.0 (#5213) 2023-03-18 13:53:15 +01:00
dependabot[bot]
686da5a948
Bump tox from 4.4.6 to 4.4.7 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.6 to 4.4.7.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.4.6...4.4.7)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-18 10:58:57 +00:00
dependabot[bot]
8a2829de87
Bump pytest-xdist from 3.2.0 to 3.2.1 in /test
Bumps [pytest-xdist](https://github.com/pytest-dev/pytest-xdist) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/pytest-dev/pytest-xdist/releases)
- [Changelog](https://github.com/pytest-dev/pytest-xdist/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-xdist/compare/v3.2.0...v3.2.1)

---
updated-dependencies:
- dependency-name: pytest-xdist
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-18 10:58:49 +00:00
dependabot[bot]
3a592e56ba
Bump actions/checkout from 3.3.0 to 3.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-18 10:56:52 +00:00
William Blew
3c91b6558d
restore the addKey comment, reworded for anchors
Per @dschaper, restore the addKey clarifying comment. It has
been reworded to describe the use of anchors where before it
referenced using grep's  'match only an entire line' argument.

Signed-off-by: William Blew <william@kulian.org>
2023-03-17 11:50:53 -07:00
William Blew
b9a6970bfd
Fix addKey to handle substrings of existing keys
Fix addKey to handle the case where a key is being added, and that key
is the leading substring of an already existing key within that file.

For example: add "server=192.168.1.1", when "server=192.168.1.178"
already exists within the /etc/dnsmasq.d/01-pihole.conf file.

Check pihole docker with PIHOLE_DNS="192.168.1.178;192.168.1.1". Its
/etc/dnsmasq/01-pihole.conf will be missing its second server= entry.

Add the test_key_addition_substr, to test addKey when
its adding a substring key of an existing key in the file.

Signed-off-by: William Blew <william@kulian.org>
2023-03-17 11:50:52 -07:00
RD WebDesign
20f8c6af3c
Search for ABP entries only if they exist in gravity.db
and use `abp_domains` property.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-17 14:17:53 -03:00
RD WebDesign
c35ed68051
Allow pihole -q matching ABP subdomains
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-03-14 17:31:39 -03:00
Dan Schaper
75a32d22a3
Allow limited parsing of ABP style adlists (#5179) 2023-03-14 13:23:03 -07:00
Christian König
71e262c37f
Revert "Allow final dot (root zone)"
This reverts commit 0b5da9f0da.

Signed-off-by: Christian König <ckoenig@posteo.de>
2023-03-14 19:50:53 +01:00
Dan Schaper
04b909c837
Convert domain to lowercase in pihole -q (#5200) 2023-03-07 17:49:51 -08:00
Christian König
309ee78903
Use distinct variabled
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-03-07 20:40:16 +01:00
Christian König
d6f5552ccf
Convert domain to lowercase in pihole -q
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-03-06 21:52:54 +01:00
yubiuser
67a973a17d
Bump pytest from 7.2.1 to 7.2.2 in /test (#5194) 2023-03-04 13:44:43 +01:00
dependabot[bot]
0b60601f86
Bump pytest from 7.2.1 to 7.2.2 in /test
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.1...7.2.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-04 10:57:42 +00:00
Christian König
0b5da9f0da
Allow final dot (root zone)
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-03-04 10:36:07 +01:00
Dan Schaper
0589641bf0
GitHub Workflows security hardening (#5053) 2023-03-02 14:36:00 -08:00
Alex
ddf972cede
build: harden workflow permissions
Signed-off-by: Alex <aleksandrosansan@gmail.com>
2023-03-02 22:18:00 +01:00
MichaIng
73de49323c
Remove systemd service and optionally override configs on uninstall
This has been forgotten when adding the new native systemd service.

Signed-off-by: MichaIng <micha@dietpi.com>
2023-02-27 16:51:32 +01:00
Christian König
16385af3ef
Use dedicated pattern variable to make RegEx reusable
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-02-26 21:16:45 +01:00
Christian König
6cb0be82ca
Add flag abp_domains into info table to signal if abp domains have been found
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-02-26 10:34:17 +01:00
yubiuser
2dd31ce6ee
Bump tox from 4.4.5 to 4.4.6 in /test (#5187) 2023-02-25 14:25:05 +01:00
dependabot[bot]
31a9e18997
Bump tox from 4.4.5 to 4.4.6 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.4.5 to 4.4.6.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.4.5...4.4.6)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 10:57:18 +00:00
Christian König
821c7dc190
Add info when list cotains ABP style domains
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-02-24 22:18:41 +01:00