calibre-web icon indicating copy to clipboard operation
calibre-web copied to clipboard

Calibre-Web 0.6.19 constantly logging me out

Open MrMxyzptlk opened this issue 1 year ago • 6 comments

This started with my latest upgrade to 0.6.19

I have tried the temp fix: With calibre-web version 0.6.18 the working workaround is still:

Comment out / remove lm.session_protection = 'strong' in /app/calibre-web/cps/init.py Comment out / remove those lines in /app/calibre-web/cps/admin.py if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path: logout_user()

Without success.

I don't want to downgrade, because I need some of the new fixes / features, but it is every other click or 2 that I have to re login.

I have 2 instances running with 2 different db's, as long as I only log into 1 of them, this issue doesn't occur.

MrMxyzptlk avatar Aug 19 '22 18:08 MrMxyzptlk

Try this:

#!/bin/bash

# Place in custom-cont-init.d/ folder

echo "**** patching calibre-web - removing session protection ****"

sed -i "/lm.session_protection = 'strong'/d" /app/calibre-web/cps/__init__.py
sed -i "/if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:/d" /app/calibre-web/cps/admin.py
sed -i "/logout_user()/d" /app/calibre-web/cps/admin.py

carlyman avatar Aug 21 '22 21:08 carlyman

Thank you, but those edits are what I was stating above, that I had already done; and then restarted CW.

It has something to do with running 2 instances at once?

MrMxyzptlk avatar Aug 22 '22 11:08 MrMxyzptlk

Here are some hints on how to deal with it: https://github.com/janeczku/calibre-web/issues/1466

OzzieIsaacs avatar Aug 27 '22 08:08 OzzieIsaacs

I have the same issue, that Calibre-web logging me out (all the time); Also with newest version .... same problem ! BUT only at Safari. If I try with Chrome, no issues .... ?

Thomas1005 avatar Aug 28 '22 11:08 Thomas1005

Closed ? Maybe I missed something

Thomas1005 avatar Aug 28 '22 13:08 Thomas1005

I'll reopen it. I run Python 3 and have the latest CW, but it still does the same. I've run the scripts to remove the security, with no change.

Until someone responds to me in Discord on how to run 2 instances with 2 different network ports on Windows Server 2022, I will have to continue to install CW the original way. It works great but I can only log into 1 instance at a time or the other logs itself out.

MrMxyzptlk avatar Aug 28 '22 13:08 MrMxyzptlk

Put this in Nginx Proxy Managers advance tab:

proxy_hide_header 'x-frame-options'; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; real_ip_header X-Forwarded-For;

Surgical71 avatar Sep 21 '22 15:09 Surgical71

Thank you for your reply, but I don't use a proxy or Nginx? ...that I'm aware of.

MrMxyzptlk avatar Sep 21 '22 16:09 MrMxyzptlk

Put this in Nginx Proxy Managers advance tab:

proxy_hide_header 'x-frame-options'; proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; real_ip_header X-Forwarded-For;

Thanks! This fixed my continuous logging out!

amirhomayoun avatar Oct 02 '22 01:10 amirhomayoun