infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
22.13k stars 2.17k forks source link

[Bug]: API token generated by one account is sometimes bound to the other account. #3253

Open wuyeguo opened 21 hours ago

wuyeguo commented 21 hours ago

Is there an existing issue for the same bug?

Branch name

0.13

Commit ID

v0.13

Other environment information

docker compose

Actual behavior

mysql data: user

mysql> select * from user\G;
*************************** 1. row ***************************
              id: 2acd49349b5311efb16f0242ac180006
     create_time: 1730796697556
     create_date: 2024-11-05 16:51:37
     update_time: 1730879681635
     update_date: 2024-11-06 15:54:41
    access_token: 613ba5389c1411efb2940242ac190006
        nickname: xiaoqiong
        password: scrypt:32768:8:1$yPsM5Q0AJE1mHLzr$9b70ccdad7dad25a44b8fd2e3b92ba587158846a88229c53b93042ce56259f738b93246663ef1daa21ce9d4fea6391c909b360f53f57359017c4ec00f0c80420
           email: lixiaoqiong@weiyankeji.cn
          avatar: NULL
        language: Chinese
    color_schema: Bright
        timezone: UTC+8 Asia/Shanghai
 last_login_time: 2024-11-05 08:51:37
is_authenticated: 1
       is_active: 1
    is_anonymous: 0
   login_channel: password
          status: 1
    is_superuser: 0
*************************** 2. row ***************************
              id: c4fdd8c29b3d11ef81a40242ac170006
     create_time: 1730787507355
     create_date: 2024-11-05 14:18:27
     update_time: 1730956986161
     update_date: 2024-11-07 13:23:06
    access_token: 5e51a3d99cc811ef9d1a0242ac1c0006
        nickname: root
        password: scrypt:32768:8:1$h87JOXHdYvxZbvzT$9e403eb6198cb892d0b9272adac3d15bd26f07843d2f4b025e660ac8a1d49012cde0f2414c240a6d847c027592ce8e955ab65bcb44f1d8cf5c0396b942df6647
           email: root@weiyankeji.cn
          avatar: NULL
        language: Chinese
    color_schema: Bright
        timezone: UTC+8 Asia/Shanghai
 last_login_time: 2024-11-05 06:18:27
is_authenticated: 1
       is_active: 1
    is_anonymous: 0
   login_channel: password
          status: 1
    is_superuser: 0
2 rows in set (0.00 sec)

root user generate api token

mysql> select * from api_token\G
*************************** 1. row ***************************
create_time: 1730957520282
create_date: 2024-11-07 13:32:00
update_time: 1730957520282
update_date: 2024-11-07 13:32:00
  tenant_id: 2acd49349b5311efb16f0242ac180006
      token: ragflow-ljYWVhNDkzOWNjOTExZWY5YWJlMDI0Mm
  dialog_id: NULL
     source: NULL
1 row in set (0.01 sec)

my config step

https://github.com/user-attachments/assets/6074a6f1-affd-42ce-9c6e-102962fab4d3

Expected behavior

No response

Steps to reproduce

Create two users similar to my data structure, and generate an API token under one of the accounts.

Additional information

No response

Feiue commented 20 hours ago

OK,I understand it. I will fix it.