Coder Social home page Coder Social logo

Comments (7)

troycarpenter avatar troycarpenter commented on September 6, 2024

I am not getting this on my stand-alone test machine which is up to date with the develop branch.

It looks like there's something there about proxy headers, so that might explain why I'm seeing it on the production server and not the development server.

from ampache-docker.

troycarpenter avatar troycarpenter commented on September 6, 2024

So the quick fix was to comment out lines 142 through 145 in src/Module/System/Core.php. Since I am using a proxy, I just simply returned the value for HTTP_X_FORWARDED_FOR variable.

The problem is this statement:
filter_has_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)

from ampache-docker.

troycarpenter avatar troycarpenter commented on September 6, 2024

I think this is a problem in the source, not with the docker image itself.

from ampache-docker.

shikasta-net avatar shikasta-net commented on September 6, 2024

I can confirm this issue. I'll try your fix. It's probably an unfortunate combination of PHP8 update and the source, and proxies.

from ampache-docker.

shikasta-net avatar shikasta-net commented on September 6, 2024

Yup, unborked by doing the following:
replace filter_has_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP) with filter_var($_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP).
The function filter_has_var is the wrong function and should probably be filter_var, but the && means this bug only occurs if the header is set; i.e., using a proxy.

from ampache-docker.

troycarpenter avatar troycarpenter commented on September 6, 2024

Due to other problems I'm having with this image (LDAP issues with some users), I had to restore the previous image. I'm not able to try the filter_var change to see if that's what the change should be.

from ampache-docker.

troycarpenter avatar troycarpenter commented on September 6, 2024

I see you made the fix. I'm trusting the function change is the root. Focusing on the LDAP problem that has crept up. Seems one of my LDAP users (me, specifically) stopped working about three DOCKER images ago when trying to log in via the Subsonic API. So far I've seen other users log in via their mobile apps, so it may be that my password has newly blocked characters.

from ampache-docker.

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.