Coder Social home page Coder Social logo

Comments (8)

Chacsam avatar Chacsam commented on July 27, 2024 1

When putting the hash in '', the application crashes:

File "/etc/ihatemoney/ihatemoney.cfg", line 4

    ADMIN_PASSWORD = ''pbkdf2:sha256:260000$aK5qSyAdIa762UNO$xxxx''

SyntaxError: invalid decimal literal

[2023-07-10 14:35:54 +0000] [8] [INFO] Worker exiting (pid: 8)

[2023-07-10 14:35:54 +0000] [1] [INFO] Shutting down: Master

[2023-07-10 14:35:54 +0000] [1] [INFO] Reason: Worker failed to boot.```

from ihatemoney.

besendorf avatar besendorf commented on July 27, 2024 1

When putting the hash in '', the application crashes:

File "/etc/ihatemoney/ihatemoney.cfg", line 4

    ADMIN_PASSWORD = ''pbkdf2:sha256:260000$aK5qSyAdIa762UNO$xxxx''

SyntaxError: invalid decimal literal

[2023-07-10 14:35:54 +0000] [8] [INFO] Worker exiting (pid: 8)

[2023-07-10 14:35:54 +0000] [1] [INFO] Shutting down: Master

[2023-07-10 14:35:54 +0000] [1] [INFO] Reason: Worker failed to boot.```

Single ' not double

from ihatemoney.

AkshayRao27 avatar AkshayRao27 commented on July 27, 2024

I have the same issue.

I am on Ubuntu 22.04.1 LTS and using Portainer CE 2.17.0 Docker 23.0.1.

I tried generating the hash using just ihatemoney generate_password_hash via the Portainer Console within the container, as well as generating it via the console using the same command you did.

Here's my compose file:

version: "3.9"

services:
  ihatemoney:
    image: ihatemoney/ihatemoney:latest
    environment:
      - DEBUG=False
      - ACTIVATE_ADMIN_DASHBOARD=True
      - ACTIVATE_DEMO_PROJECT=False
      - ADMIN_PASSWORD=<hash-generated-as-described-above>
      - ALLOW_PUBLIC_PROJECT_CREATION=True
      - BABEL_DEFAULT_TIMEZONE=Europe/Vienna
      - GREENLET_TEST_CPP=no
      - MAIL_DEFAULT_SENDER=Budget Manager <[email protected]>
      - MAIL_PASSWORD=
      - MAIL_PORT=25
      - MAIL_SERVER=localhost
      - MAIL_USE_SSL=False
      - MAIL_USE_TLS=False
      - MAIL_USERNAME=
      - SECRET_KEY=<is-a-secret>
      - SESSION_COOKIE_SECURE=False
      - SHOW_ADMIN_EMAIL=True
      - SQLALCHEMY_DATABASE_URI=sqlite:////database/ihatemoney.db
      - SQLALCHEMY_TRACK_MODIFICATIONS=False
      - ENABLE_CAPTCHA=True
      - LEGAL_LINK=
      - PORT=8000
      - PUID=0
      - PGID=0
    ports:
      - 32660:8000

from ihatemoney.

LilPeen avatar LilPeen commented on July 27, 2024

I too tried installing this recently and also can't access.. even though I got the proper hash or atleast the one generated by the command.

I tried multiple times, but no change. FWIW here's my Settings and the error I'm getting.

version: "3.9"

services:
  ihatemoney:
    image: ihatemoney/ihatemoney:latest
    container_name: ihatemoney
    environment:
      - DEBUG=False
      - ACTIVATE_ADMIN_DASHBOARD=True
      - ACTIVATE_DEMO_PROJECT=False
      - ADMIN_PASSWORD=pbkdf2:sha256:260000$jk0qpL7E8i35MrNM$f2ac9f48fa356c44fef95639c3cac588df0eaf455d29753a827f8df74814a709
      - ALLOW_PUBLIC_PROJECT_CREATION=False
      - BABEL_DEFAULT_TIMEZONE=america/new_york
      - GREENLET_TEST_CPP=no
      - MAIL_DEFAULT_SENDER=
      - MAIL_PASSWORD=
      - MAIL_PORT=
      - MAIL_SERVER=
      - MAIL_USE_SSL=True
      - MAIL_USE_TLS=False
      - MAIL_USERNAME=
      - SECRET_KEY=pingadulce
      - SESSION_COOKIE_SECURE=True
      - SHOW_ADMIN_EMAIL=True
      - SQLALCHEMY_DATABASE_URI=sqlite:////database/ihatemoney.db
      - SQLALCHEMY_TRACK_MODIFICATIONS=False
      - ENABLE_CAPTCHA=False
      - LEGAL_LINK=
      - PORT=8000
      - PUID=0
      - PGID=0
    networks:
      - nginx_default
    ports:
      - "8003:8000"
networks:
  nginx_default:
    external: true

and getting this:

WARN[0000] The "jk0qpL7E8i35MrNM" variable is not set. Defaulting to a blank string. 
WARN[0000] The "f2ac9f48fa356c44fef95639c3cac588df0eaf455d29753a827f8df74814a709" variable is not set. Defaulting to a blank string.

Which makes it seem like it's just ignoring everything after "$"

If any of this helps :D

from ihatemoney.

LilPeen avatar LilPeen commented on July 27, 2024

#334 (comment)

This fixed it... Might be worth adding this in documentation.. but sharing here for @AkshayRao27 @Chacsam

Made a separate post so if someone runs into my previous example. But I am now operational! Thanks!

from ihatemoney.

AkshayRao27 avatar AkshayRao27 commented on July 27, 2024

I tried the fixes listed in #334

  • I removed all dollar signs from the Secret Key
  • I used the no-dollared secret key to generate a new hash
  • I double-dollared all of the dollar signs in the hash and redeployed

It still doesn't work for me. What might I be doing wrong?

from ihatemoney.

jonathan8devs avatar jonathan8devs commented on July 27, 2024

The trick is to put the hash in '':
- ADMIN_PASSWORD='pbkdf2:sha256:260000$randomhash'

from ihatemoney.

zorun avatar zorun commented on July 27, 2024

So, quoting doesn't work, because it gets quoted again in Python.

But double dollars work fine, I have added some "documentation" about it here: #1183

from ihatemoney.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.