Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#permissions.
'permissions': {}
'env':
'GO_VERSION': '1.26.3'
'GO_VERSION': '1.26.4'
'NODE_VERSION': '20'
'on':
'push':
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ NOTE: Add new changes BELOW THIS COMMENT.

### Security

- Go version has been updated to prevent the possibility of exploiting the Go vulnerabilities fixed in [1.26.4][go-1.26.4].

- The H2C connection establishment via HTTP/1.1 request upgrade is no longer supported. See [RFC 9113][rfc9113].

- The size of rulelists is limited. This is necessary to prevent a user's machine from becoming overloaded if the filter source misbehaves.
- The size of rulelists is limited. This is necessary to prevent a user's machine from becoming overloaded if the filter source misbehaves.

### Changed

- The interval of filter updates can now be set to any number of ours between 0 and 365 days in the configuration file.

#### Configuration changes

- The `filtering` object of the YAML configuration now includes a new property, `max_http_size`, which defines the maximum size of the HTTP request for rulelists. To disable the limitation, set a large size, such as `1 TB`.
Expand All @@ -40,7 +44,8 @@ NOTE: Add new changes BELOW THIS COMMENT.

- Blocked services check on the Custom filtering rules page does not work properly without specifying of a client.

[rfc9113]: https://datatracker.ietf.org/doc/html/rfc9113
[rfc9113]: https://datatracker.ietf.org/doc/html/rfc9113
[go-1.26.4]: https://groups.google.com/g/golang-announce/c/tKs3rmcBcKw

<!--
NOTE: Add new changes ABOVE THIS COMMENT.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DIST_DIR = dist
GOAMD64 = v1
GOPROXY = https://proxy.golang.org|direct
GOTELEMETRY = off
GOTOOLCHAIN = go1.26.3
GOTOOLCHAIN = go1.26.4
GPG_KEY = devteam@adguard.com
GPG_KEY_PASSPHRASE = not-a-real-password
NPM = npm
Expand Down
6 changes: 3 additions & 3 deletions bamboo-specs/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'cacheBuster': '0'
'channel': 'edge'
'dockerFrontend': 'adguard/home-js-builder:4.0'
'dockerGo': 'adguard/go-builder:1.26.3--1'
'dockerGo': 'adguard/go-builder:1.26.4--1'

'stages':
- 'Build frontend':
Expand Down Expand Up @@ -280,7 +280,7 @@
'variables':
'channel': 'beta'
'dockerFrontend': 'adguard/home-js-builder:4.0'
'dockerGo': 'adguard/go-builder:1.26.3--1'
'dockerGo': 'adguard/go-builder:1.26.4--1'
# release-vX.Y.Z branches are the branches from which the actual final
# release is built.
- '^release-v[0-9]+\.[0-9]+\.[0-9]+':
Expand All @@ -296,4 +296,4 @@
'variables':
'channel': 'release'
'dockerFrontend': 'adguard/home-js-builder:4.0'
'dockerGo': 'adguard/go-builder:1.26.3--1'
'dockerGo': 'adguard/go-builder:1.26.4--1'
4 changes: 2 additions & 2 deletions bamboo-specs/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'cacheBuster': '0'
'channel': 'development'
'dockerFrontend': 'adguard/home-js-builder:4.0'
'dockerGo': 'adguard/go-builder:1.26.3--1'
'dockerGo': 'adguard/go-builder:1.26.4--1'

'stages':
- 'Tests':
Expand Down Expand Up @@ -255,5 +255,5 @@
# may need to build a few of these.
'variables':
'dockerFrontend': 'adguard/home-js-builder:4.0'
'dockerGo': 'adguard/go-builder:1.26.3--1'
'dockerGo': 'adguard/go-builder:1.26.4--1'
'channel': 'candidate'
15 changes: 8 additions & 7 deletions client/src/components/Settings/FiltersConfig/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ import { Trans, useTranslation } from 'react-i18next';

import i18next from 'i18next';
import { toNumber } from '../../../helpers/form';
import { DAY, FILTERS_INTERVALS_HOURS, FILTERS_RELATIVE_LINK } from '../../../helpers/constants';
import { DAY_HOURS, FILTERS_INTERVALS_HOURS, FILTERS_RELATIVE_LINK } from '../../../helpers/constants';
import { Checkbox } from '../../ui/Controls/Checkbox';
import { Select } from '../../ui/Controls/Select';

const THREE_DAYS_INTERVAL = DAY * 3;
const SEVEN_DAYS_INTERVAL = DAY * 7;

const getTitleForInterval = (interval: number) => {
if (interval === 0) {
return i18next.t('disabled');
}

if (interval === THREE_DAYS_INTERVAL || interval === SEVEN_DAYS_INTERVAL) {
return i18next.t('interval_days', { count: interval / DAY });
if (interval % DAY_HOURS === 0) {
return i18next.t('interval_days', { count: interval / DAY_HOURS });
}

return i18next.t('interval_hours', { count: interval });
Expand Down Expand Up @@ -58,6 +55,10 @@ export const FiltersConfig = ({ initialValues, setFiltersConfig, processing }: P
a: <a href={FILTERS_RELATIVE_LINK} rel="noopener noreferrer" />,
};

const options = FILTERS_INTERVALS_HOURS.includes(initialValues.interval)
? FILTERS_INTERVALS_HOURS
: [...FILTERS_INTERVALS_HOURS, initialValues.interval];

return (
<>
<div className="row">
Expand Down Expand Up @@ -99,7 +100,7 @@ export const FiltersConfig = ({ initialValues, setFiltersConfig, processing }: P
const { value } = e.target;
field.onChange(toNumber(value));
}}>
{FILTERS_INTERVALS_HOURS.map((interval) => (
{options.map((interval) => (
<option value={interval} key={interval}>
{getTitleForInterval(interval)}
</option>
Expand Down
4 changes: 3 additions & 1 deletion client/src/helpers/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ export const DISABLED_STATS_INTERVAL = 0;

export const HOUR = 60 * 60 * 1000;

export const DAY = HOUR * 24;
export const DAY_HOURS = 24;

export const DAY = HOUR * DAY_HOURS;

export const STATS_INTERVALS_DAYS = [DAY, DAY * 7, DAY * 30, DAY * 90];

Expand Down
2 changes: 1 addition & 1 deletion docker/ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# needed. Keep it in sync with bamboo-specs/bamboo.yaml.

# NOTE: Keep in sync with bamboo-specs/bamboo.yaml.
ARG BASE_IMAGE=adguard/go-builder:1.26.3--1
ARG BASE_IMAGE=adguard/go-builder:1.26.4--1

# The dependencies stage is needed to install packages and tool dependencies.
# This is also where binaries like osslsigncode, which may be required for tests
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/AdguardTeam/AdGuardHome

go 1.26.3
go 1.26.4

require (
github.com/AdguardTeam/dnsproxy v0.81.4
Expand Down
7 changes: 5 additions & 2 deletions internal/filtering/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,10 @@ func (d *DNSFilter) RegisterFilteringHandlers() {
registerHTTP(http.MethodGet, "/control/filtering/check_host", d.handleCheckHost)
}

// maxUpdateIvlHours is the maximum allowed filter update interval in hours.
const maxUpdateIvlHours = 365 * 24

// ValidateUpdateIvl returns false if i is not a valid filters update interval.
func ValidateUpdateIvl(i uint32) bool {
return i == 0 || i == 1 || i == 12 || i == 1*24 || i == 3*24 || i == 7*24
func ValidateUpdateIvl(i uint32) (ok bool) {
return i <= maxUpdateIvlHours
}
6 changes: 6 additions & 0 deletions openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<!-- TODO(a.garipov): Reformat in accordance with the KeepAChangelog spec. -->

## v0.107.78: API changes

### New `interval` values in `GET /control/filtering/status` and `POST /control/filtering/config` APIs

The property `interval` of the objects returned from and accepted by the aforementioned APIs can now be any integer between 0 and 8760 (365 days).

## v0.107.77: API changes

### New `reason` query parameter in 'GET /control/querylog'
Expand Down
Loading