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

playgroundEnabled not working in configuration (Docker setup) #175

Closed
pitininja opened this issue Oct 10, 2022 · 3 comments
Closed

playgroundEnabled not working in configuration (Docker setup) #175

pitininja opened this issue Oct 10, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@pitininja
Copy link

pitininja commented Oct 10, 2022

Hello,

I've setup LibreCaptcha with Docker on a server. I use this docker-compose:

version: '3'

services:
  librecaptcha:
    container_name: librecaptcha
    image: librecaptcha/lc-core:latest
    restart: always
    volumes: 
      - librecaptcha_data:/lc-core/data
    networks:
      - librecaptcha-network
    ports: 
      - 127.0.0.1:8888:8888

volumes:
  librecaptcha_data:

networks:
  librecaptcha-network:
    name: librecaptcha

I've edited the configuration file located in the Docker volume with this configuration:

{
    "randomSeed": 1234,
    "port": 8888,
    "playgroundEnabled": false,
    "throttle": 10,
    "captchaExpiryTimeLimit": 5,
    "bufferCount": 1000,
    "threadDelay": 2,
    "corsHeader": "",
    "maxAttemptsRatio": 0.01,
    "captchas": [{
        "name": "FilterChallenge",
        "allowedLevels": [
            "medium",
            "hard"
        ],
        "allowedMedia": [
            "image/png"
        ],
        "allowedInputType": [
            "text"
        ],
        "config": {}
    }, {
        "name": "GifCaptcha",
        "allowedLevels": [
            "hard"
        ],
        "allowedMedia": [
            "image/gif"
        ],
        "allowedInputType": [
            "text"
        ],
        "config": {}
    }, {
        "name": "ShadowTextCaptcha",
        "allowedLevels": [
            "easy"
        ],
        "allowedMedia": [
            "image/png"
        ],
        "allowedInputType": [
            "text"
        ],
        "config": {}
    }, {
        "name": "RainDropsCaptcha",
        "allowedLevels": [
            "easy",
            "medium"
        ],
        "allowedMedia": [
            "image/gif"
        ],
        "allowedInputType": [
            "text"
        ],
        "config": {}
    }]
}

Configuration seems to be working fine.

However, even if the playgroundEnabled field is set to false, the demo is still served and available. I would like to disable this feature but I can't.

Thank you for any help

@pitininja pitininja changed the title playgroundEnabled not working in configuration (Docker setup) playgroundEnabled not working in configuration (Docker setup) Oct 10, 2022
@hrj
Copy link
Contributor

hrj commented Oct 10, 2022

Thanks for the detailed report. There seems to be a bug here. A logical OR with True will always evaluate to True.

I will fix it soon and make a new release.

@hrj hrj self-assigned this Oct 10, 2022
@hrj hrj added the bug label Oct 10, 2022
@hrj hrj closed this as completed in 58c6e96 Oct 11, 2022
@hrj hrj modified the milestones: next version, v2.0.1 Oct 11, 2022
@hrj
Copy link
Contributor

hrj commented Oct 11, 2022

Hi @pitininja

The bug is fixed and released as part of 2.0.1.

Since you are using the latest image, it should work if you just update the image. Else, you can use the 2.0 or 2.0.1 tag.

@pitininja
Copy link
Author

Thank you very much for the fix @hrj.

It works great now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants