[GH-ISSUE #4114] Token authentication is broken #3244

Closed
opened 2026-05-05 14:05:42 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @igrowstuff on GitHub (Mar 28, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4114

Bug Description

If I specify no token in my frpc.toml then frpc connects anyway.

If I specify an incorrect token frps rejects the connection correctly.

frpc Version

0.56.0

frps Version

0.56.0

System Architecture

linux/amd64

Configurations

frps config

[common]
bindPort = 7000
auth.method = "token"
auth.token = "pewpewpew"

frpc config

serverAddr = "1.1.1.1"
serverPort = 7000

proxies
name = "ssh"
type = "tcp"
localIP = "localhost"
localPort = 22
remotePort = 22

Logs

2024-03-28 13:31:35.973 [I] [sub/root.go:142] start frpc service for config file [frpc.toml]
2024-03-28 13:31:35.973 [I] [client/service.go:294] try to connect to server...
2024-03-28 13:31:36.114 [I] [client/service.go:286] [pewpewpew] login to server success, get run id [pewpwpw]
2024-03-28 13:31:36.114 [I] [proxy/proxy_manager.go:173] [pewpewpew] proxy added: [ssh]
2024-03-28 13:31:36.178 [I] [client/control.go:170] [pewpewpew] [ssh] start proxy success

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @igrowstuff on GitHub (Mar 28, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4114 ### Bug Description If I specify no token in my frpc.toml then frpc connects anyway. If I specify an incorrect token frps rejects the connection correctly. ### frpc Version 0.56.0 ### frps Version 0.56.0 ### System Architecture linux/amd64 ### Configurations frps config [common] bindPort = 7000 auth.method = "token" auth.token = "pewpewpew" frpc config serverAddr = "1.1.1.1" serverPort = 7000 [[proxies]] name = "ssh" type = "tcp" localIP = "localhost" localPort = 22 remotePort = 22 ### Logs 2024-03-28 13:31:35.973 [I] [sub/root.go:142] start frpc service for config file [frpc.toml] 2024-03-28 13:31:35.973 [I] [client/service.go:294] try to connect to server... 2024-03-28 13:31:36.114 [I] [client/service.go:286] [pewpewpew] login to server success, get run id [pewpwpw] 2024-03-28 13:31:36.114 [I] [proxy/proxy_manager.go:173] [pewpewpew] proxy added: [ssh] 2024-03-28 13:31:36.178 [I] [client/control.go:170] [pewpewpew] [ssh] start proxy success ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [X] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@xqzr commented on GitHub (Mar 29, 2024):

[common]

<!-- gh-comment-id:2026840696 --> @xqzr commented on GitHub (Mar 29, 2024): ~~`[common]`~~
Author
Owner

@igrowstuff commented on GitHub (Mar 29, 2024):

Correct, this is my fault. With [common] removed this works as expected. Sorry for wasting your time!

<!-- gh-comment-id:2026889721 --> @igrowstuff commented on GitHub (Mar 29, 2024): Correct, this is my fault. With `[common]` removed this works as expected. Sorry for wasting your time!
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#3244
No description provided.