silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.04k stars 141 forks source link

SB_AUTH_TOKEN without SB_USER #799

Closed aorith closed 3 months ago

aorith commented 4 months ago

At this moment, the authorization code does the following:

      if (!spaceServer.auth) {
        // Auth disabled in this config, skip
        return next();
      }

This makes it impossible to only enable SB_AUTH_TOKEN without SB_USER (or the flag --user). So someone could think that the API is protected when it's not since it requires the basic auth enabled.

zefhemel commented 3 months ago

Good point. Will fix.