Restoring a workflow breaks secret env variables #12132

Closed
opened 2026-02-21 19:05:56 -05:00 by yindo · 1 comment
Owner

Originally created by @DavideDelbianco on GitHub (Mar 25, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Create a workflow with an HTTP node that uses as bearer a value from a secret
Publish the workflow
Do some modifications and the use the Restore feature from the workflow history

Just try an empty GET request to https://r.jina.ai
And pass the api key like that:
Image

✔️ Expected Behavior

Env variables should retain their value

Actual Behavior

Env variables becomes invalid

Originally created by @DavideDelbianco on GitHub (Mar 25, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Create a workflow with an HTTP node that uses as bearer a value from a secret Publish the workflow Do some modifications and the use the Restore feature from the workflow history Just try an empty GET request to https://r.jina.ai And pass the api key like that: ![Image](https://github.com/user-attachments/assets/f1f352a0-93a6-429b-b289-44165861b1f7) ### ✔️ Expected Behavior Env variables should retain their value ### ❌ Actual Behavior Env variables becomes invalid
yindo added the 🐞 bug🌊 feat:workflow labels 2026-02-21 19:05:56 -05:00
yindo closed this issue 2026-02-21 19:05:56 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 25, 2025):

I found a similar closed issue regarding the problem with secret environment variables changing during the restore process. The issue is due to the way secret values are handled in the Dify platform. When a secret environment variable is saved, its value is replaced with a placeholder [__HIDDEN__] to prevent exposure of sensitive information. This is a security measure. The expected behavior would be to either maintain the original secret value during restoration or to clear the secret value and notify the user, prompting for confirmation before restoring [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 25, 2025): <!-- Answer --> I found a similar closed issue regarding the problem with secret environment variables changing during the restore process. The issue is due to the way secret values are handled in the Dify platform. When a secret environment variable is saved, its value is replaced with a placeholder `[__HIDDEN__]` to prevent exposure of sensitive information. This is a security measure. The expected behavior would be to either maintain the original secret value during restoration or to clear the secret value and notify the user, prompting for confirmation before restoring <sup>[[1]](https://github.com/langgenius/dify/issues/12255)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fc5ec12b-f491-4cc9-b6b6-a8a0c14e920c?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12132