[GH-ISSUE #2885] Frp can't handle equal sign in environment variables #2299

Closed
opened 2026-05-05 13:29:04 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @ThomasDeLetter on GitHub (Apr 4, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2885

Bug Description

Environment variables containing an equal sign = are ignored during parsing of config files.

We use meta properties to pass temporary AWS credentials to the frp server to authenticate a user. These credentials may contain an equal sign.

frpc Version

0.39.1

frps Version

0.39.1

System Architecture

darwin/amd64

Configurations

server

[common]
bind_port = 7000
vhost_http_port = 8000
subdomain_host = example.com

[plugin.login]
addr = localhost:3000
path = /login
ops = Login

client

[common]
server_addr = example.com
server_port = 7000
tls_enable = true
disable_custom_tls_first_byte = true
meta_access_key_id = {{ .Envs.AWS_ACCESS_KEY_ID }}
meta_secret_access_key = {{ .Envs.AWS_SECRET_ACCESS_KEY }}
meta_session_token = {{ .Envs.AWS_SESSION_TOKEN }}
disable_log_color = true

[{{ .Envs.FRP_SUBDOMAIN }}]
type = http
subdomain = test
local_port = 8080
local_ip = localhost

Logs

No response

Steps to reproduce

  1. Create configuration file with an environment variable.
  2. Set the value of this environment variable to something containing a =.
  3. Observe that the environment variable is not correctly substituted in the configuration file.

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @ThomasDeLetter on GitHub (Apr 4, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2885 ### Bug Description Environment variables containing an equal sign `=` are ignored during parsing of config files. We use meta properties to pass temporary AWS credentials to the frp server to authenticate a user. These credentials may contain an equal sign. ### frpc Version 0.39.1 ### frps Version 0.39.1 ### System Architecture darwin/amd64 ### Configurations # server ``` ini [common] bind_port = 7000 vhost_http_port = 8000 subdomain_host = example.com [plugin.login] addr = localhost:3000 path = /login ops = Login ``` # client ``` ini [common] server_addr = example.com server_port = 7000 tls_enable = true disable_custom_tls_first_byte = true meta_access_key_id = {{ .Envs.AWS_ACCESS_KEY_ID }} meta_secret_access_key = {{ .Envs.AWS_SECRET_ACCESS_KEY }} meta_session_token = {{ .Envs.AWS_SESSION_TOKEN }} disable_log_color = true [{{ .Envs.FRP_SUBDOMAIN }}] type = http subdomain = test local_port = 8080 local_ip = localhost ``` ### Logs _No response_ ### Steps to reproduce 1. Create configuration file with an environment variable. 2. Set the value of this environment variable to something containing a `=`. 3. Observe that the environment variable is not correctly substituted in the configuration file. ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [X] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:29:04 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@fatedier commented on GitHub (Apr 4, 2022):

Thanks for your report.

I find this a bug in parsing env value. I will fix this soon.

<!-- gh-comment-id:1087670332 --> @fatedier commented on GitHub (Apr 4, 2022): Thanks for your report. I find this a bug in parsing env value. I will fix this soon.
Author
Owner

@ThomasDeLetter commented on GitHub (Apr 21, 2022):

Thank you for fixing this bug so quickly. Do you have any idea when this will be released? Will there be a v0.41.1?

<!-- gh-comment-id:1105085951 --> @ThomasDeLetter commented on GitHub (Apr 21, 2022): Thank you for fixing this bug so quickly. Do you have any idea when this will be released? Will there be a `v0.41.1`?
Author
Owner

@fatedier commented on GitHub (Apr 21, 2022):

Thank you for fixing this bug so quickly. Do you have any idea when this will be released? Will there be a v0.41.1?

It will be released in v0.42.0 soon. Maybe this weekend.

<!-- gh-comment-id:1105448918 --> @fatedier commented on GitHub (Apr 21, 2022): > Thank you for fixing this bug so quickly. Do you have any idea when this will be released? Will there be a `v0.41.1`? It will be released in v0.42.0 soon. Maybe this weekend.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2299
No description provided.