Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't not change the user password with Container in kubernetes #8342

Open
ashyfox opened this issue Jan 8, 2025 · 2 comments
Open

Can't not change the user password with Container in kubernetes #8342

ashyfox opened this issue Jan 8, 2025 · 2 comments
Labels

Comments

@ashyfox
Copy link

ashyfox commented Jan 8, 2025

Please note that security bugs or issues should be reported to [email protected].

Describe the bug

I used kubernetes to set up pgadmin and entered it through Ingress. After setting up the user, I logged in using the user account, but I could not change the password.

A clear and concise description of what the bug is.

the log and screen will appear AttributeError: 'ChangePasswordForm' object has no attribute 'csrf_token'

To Reproduce

Steps to reproduce the behavior:

apiVersion: v1 kind: Secret metadata: name: pgadmin-secret labels: app: pgadmin version: latest type: Opaque data: PGADMIN_DEFAULT_EMAIL: cGdhZG1pbjRAcGdhZG1pbi5vcmc= # base64 encoded value of "[email protected]" PGADMIN_DEFAULT_PASSWORD: YWRtaW4= # base64 encoded value of "admin" PGADMIN_CONFIG_SERVER_MODE: VHJ1ZQ== # base64 encoded value of "True" PGADMIN_CONFIG_WTF_CSRF_CHECK_DEFAULT: RmFsc2U= PGADMIN_CONFIG_WTF_CSRF_ENABLED: RmFsc2U= PGADMIN_CONFIG_ALLOW_SAVE_PASSWORD: RmFsc2U= GUNICORN_ACCESS_LOGFILE: L2Rldi9udWxs

Expected behavior

Can Change Password

Error message

AttributeError: 'ChangePasswordForm' object has no attribute 'csrf_token'

If possible, include the full, unedited text of any error messages displayed.

Screenshots

image

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: GKE Container OS (kubernetes) / Windows
  • Version: 8.14
  • Mode: Server
  • Browser: Chorme
  • Package type: Container

Additional context

Add any other context about the problem here.

@ashyfox ashyfox added the Bug label Jan 8, 2025
@ashyfox
Copy link
Author

ashyfox commented Jan 9, 2025

I found the possible problem

  1. PGADMIN_CONFIG_WTF_CSRF_ENABLED must be set to True
  2. turn off cloudflare cache
  3. need to setting the domain with PGADMIN_CONFIG_ALLOW_SPECIAL_EMAIL_DOMAINS setting

but there is still an error in the upper right corner that the user is not displayed correctly

@yogeshmahajan-1903
Copy link
Contributor

@ashyfox
Can you please try setting PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=False in environment variable? This needs to be set in dynamic ip hosting environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants