[PR #849] [CLOSED] Further sanitization changes #1683

Closed
opened 2025-12-29 02:31:12 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/849
Author: @hedgeberg
Created: 10/7/2022
Status: Closed

Base: mainHead: sanitise-machine-key-url


📝 Commits (10+)

  • 47149e4 Move nodekey sanitization into middlewear
  • e9f45f6 Whitelisting middleware
  • 1e84cf3 Merge branch 'main' into sanitise-machine-key-url
  • 20d7130 split out oidc router and sanitize in app.go
  • 2e5f8c5 split out apple & machine routers.
  • 9454f24 add handles for router
  • 00a7168 Merge branch 'main' into sanitise-machine-key-url
  • 05d839e patch-ups from after pulling in main
  • 0531126 initial integration testing infra in http_test.go
  • 5d435c1 fix failing test by fixing WithTestName arg

📊 Changes

8 files changed (+253 additions, -34 deletions)

View changed files

📝 Makefile (+3 -0)
📝 api.go (+3 -18)
📝 app.go (+30 -11)
📝 handler_legacy.go (+10 -4)
http_utils/handlers.go (+26 -0)
http_utils/whitelists.go (+75 -0)
integration/http_test.go (+105 -0)
📝 utils.go (+1 -1)

📄 Description

Still To-Do:

  • apply whitelist to other public-facing endpoints with user input
  • determine if a length requirement can be added for each input
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 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/juanfont/headscale/pull/849 **Author:** [@hedgeberg](https://github.com/hedgeberg) **Created:** 10/7/2022 **Status:** ❌ Closed **Base:** `main` ← **Head:** `sanitise-machine-key-url` --- ### 📝 Commits (10+) - [`47149e4`](https://github.com/juanfont/headscale/commit/47149e475c031e22f79884378e953bd147986cdd) Move nodekey sanitization into middlewear - [`e9f45f6`](https://github.com/juanfont/headscale/commit/e9f45f6a0d291bfb4458857f08b836b44f0753a1) Whitelisting middleware - [`1e84cf3`](https://github.com/juanfont/headscale/commit/1e84cf3ae82c2576888405b66c926d64dfb3708e) Merge branch 'main' into sanitise-machine-key-url - [`20d7130`](https://github.com/juanfont/headscale/commit/20d713013a9532908849f60302ed93556c80b53b) split out oidc router and sanitize in app.go - [`2e5f8c5`](https://github.com/juanfont/headscale/commit/2e5f8c53f8205f0d7d974524153f22f064a79903) split out apple & machine routers. - [`9454f24`](https://github.com/juanfont/headscale/commit/9454f2425403d45567ac12287c6caed90abe4467) add handles for router - [`00a7168`](https://github.com/juanfont/headscale/commit/00a716803595f1a6741673d5cfcd17e036a26892) Merge branch 'main' into sanitise-machine-key-url - [`05d839e`](https://github.com/juanfont/headscale/commit/05d839ec9222b688be8eaa47902f655e77191cae) patch-ups from after pulling in main - [`0531126`](https://github.com/juanfont/headscale/commit/05311260dae887ef6e3b1d8e565f6a7ed9162c37) initial integration testing infra in http_test.go - [`5d435c1`](https://github.com/juanfont/headscale/commit/5d435c1f3fd89202a950c5af3c39f4734f642014) fix failing test by fixing WithTestName arg ### 📊 Changes **8 files changed** (+253 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+3 -0) 📝 `api.go` (+3 -18) 📝 `app.go` (+30 -11) 📝 `handler_legacy.go` (+10 -4) ➕ `http_utils/handlers.go` (+26 -0) ➕ `http_utils/whitelists.go` (+75 -0) ➕ `integration/http_test.go` (+105 -0) 📝 `utils.go` (+1 -1) </details> ### 📄 Description <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand Still To-Do: - [x] apply whitelist to other public-facing endpoints with user input - [ ] determine if a length requirement can be added for each input - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:31:12 +01:00
adam closed this issue 2025-12-29 02:31:12 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1683