Make hosts updates fail closed when download or content validation fails.
Changes
use a unique temporary path per run;
require a successful curl/HTTP response;
validate every IP/hostname entry;
compare the complete normalized entry set instead of only the first and last lines;
never touch the system hosts file automatically.
Validated locally against the repository hosts data, including detection of a missing middle entry.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/Flowseal/zapret-discord-youtube/pull/17123
**Author:** [@anntr1k3](https://github.com/anntr1k3)
**Created:** 8/28/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/validate-hosts-download`
---
### 📝 Commits (1)
- [`49202a3`](https://github.com/Flowseal/zapret-discord-youtube/commit/49202a3f3c0fd4635b5bb3484a73e6ba1f40763f) Validate hosts downloads before use
### 📊 Changes
**1 file changed** (+32 additions, -25 deletions)
<details>
<summary>View changed files</summary>
📝 `service.bat` (+32 -25)
</details>
### 📄 Description
## Summary
Make hosts updates fail closed when download or content validation fails.
## Changes
- use a unique temporary path per run;
- require a successful curl/HTTP response;
- validate every IP/hostname entry;
- compare the complete normalized entry set instead of only the first and last lines;
- never touch the system hosts file automatically.
Validated locally against the repository hosts data, including detection of a missing middle entry.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror-bot
changed title from [PR #17123] Validate hosts downloads before comparison to [PR #17123] [CLOSED] Validate hosts downloads before comparison2026-08-29 21:22:14 +03:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/Flowseal/zapret-discord-youtube/pull/17123
Author: @anntr1k3
Created: 8/28/2026
Status: ❌ Closed
Base:
main← Head:fix/validate-hosts-download📝 Commits (1)
49202a3Validate hosts downloads before use📊 Changes
1 file changed (+32 additions, -25 deletions)
View changed files
📝
service.bat(+32 -25)📄 Description
Summary
Make hosts updates fail closed when download or content validation fails.
Changes
Validated locally against the repository hosts data, including detection of a missing middle entry.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
[PR #17123] Validate hosts downloads before comparisonto [PR #17123] [CLOSED] Validate hosts downloads before comparison