Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: Incorrect URL Parameter Parsing Causes user_id Retrieval Error (#25261)

Debin.Menga9324133144b
diff --git a/web/app/components/base/chat/utils.ts b/web/app/components/base/chat/utils.ts
index 1c478747c5a..34df617afec 100644
--- a/web/app/components/base/chat/utils.ts
+++ b/web/app/components/base/chat/utils.ts
@@ -43,6 +43,16 @@ async function getProcessedInputsFromUrlParams(): Promise<Record<string, any>> {
async function getProcessedSystemVariablesFromUrlParams(): Promise<Record<string, any>> {
const urlParams = new URLSearchParams(window.location.search)
+ const redirectUrl = urlParams.get('redirect_url')
+ if (redirectUrl) {
+ const decodedRedirectUrl = decodeURIComponent(redirectUrl)
+ const queryString = decodedRedirectUrl.split('?')[1]
+ if (queryString) {
+ const redirectParams = new URLSearchParams(queryString)
+ for (const [key, value] of redirectParams.entries())
+ urlParams.set(key, value)
+ }
+ }
const systemVariables: Record<string, any> = {}
const entriesArray = Array.from(urlParams.entries())
await Promise.all(