goauthentik / goauthentik/authentik

extranous HTML encoding in HTML prefetch links

Open
#17,095 0 comments 0 reactions 0 assignees View on GitHub
area:backend bug status/reviewing
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 2h
Merged PRs (30d)
659

Description

**Describe the bug**
I can see the following in the HTML of the login page:

```html

```

The `&` encoding is superfluous and breaks the link.

**To Reproduce**
Steps to reproduce the behavior:

1. use S3 storage backend
2. set background image for login flow
3. visit login flow
4. inspect either network requests or HTML (Ctrl+U, around line 19)

**Expected behavior**
The links should not be URl encoded, instead retaining their GET parameters as-is.

**Screenshots**

This is the first request made by the browser:

Image

Later a second – correct – request is made, due to what I assume to be JS mechanics, but I'm not sure:

Image

**Logs**

```text
Sep 29 12:37:10 id ak[652]: {"auth_via": "unauthenticated", "domain_url": "id.benary.org", "event": "/if/flow/benaryorg-authentication/?next=%2F", "host": "id.benary.org", "level": "info", "logger": "authentik.asgi", "method": "GET", "pid": 652, "remote": "2a0c:b641:a40:0:2fa:5bff:fe25:4e0b", "request_id": "10306c0979bf48fb93fb63bbf152f6a4", "runtime": 19, "schema_name": "public", "scheme": "https", "status": 200, "timestamp": "2025-09-29T12:37:10.071879", "user": "", "user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"}
```

**Version and Deployment (please complete the following information):**

- authentik version: *2025.8.3* and *2025.2.3*
- Deployment: manual (should not be relevant for the bug in question)

**Additional context**

I did not find any issue regarding to this particular encoding problem, however I could've missed it.

full configuration

```json
{
"disable_startup_analytics": true,
"disable_update_check": true,
"email": "[CENSORED]",
"error_reporting": {
"enabled": false
},
"listen": {
"listen_debug": "[::1]:9900",
"listen_http": "[::1]:9000",
"listen_https": "[::1]:9443",
"listen_ldap": "[::1]:3389",
"listen_ldaps": "[::1]:6636",
"listen_metrics": "[::1]:9300",
"listen_radius": "[::1]:1812",
"trusted_proxy_cidrs": [
"127.0.0.0/8",
"::1/128"
]
},
"postgresql": {
"host": "/run/postgresql",
"name": "authentik",
"user": "authentik"
},
"redis": {
"host": "localhost",
"ports": 6379
},
"storage": {
"media": {
"backend": "s3",
"s3": {
"bucket_name": "id-static.benary.org",
"custom_domain": "id-static.benary.org",
"endpoint": "https://s3.ovh.xn--idk5byd.net",
"region": "default"
}
}
},
"web": {
"path": "/"
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.