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

Bug: Enabling oauth registration shows all oauth providers even if unconfigured. #457

Closed
kashalls opened this issue Sep 2, 2023 · 1 comment · Fixed by #458
Closed
Labels
bug Something isn't working

Comments

@kashalls
Copy link
Contributor

kashalls commented Sep 2, 2023

What happened?

When passing FEATURES_OAUTH_REGISTRATION as true, all three oauth providers will be shown.

Zipline Login

What should happen?

Only the configured oauth providers should show up as clicking on any of them results in Internal Server Error.

Version

latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)

What browser(s) are you seeing the problem on?

Firefox, Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc), Firefox Mobile

Zipline Logs

No relevant logs were outputted.

Browser Logs

No relevant logs were outputted.

Additional Info

{
  core: {
    secret: 'censored',
    database_url: 'postgres://censored:censored@postgres-rw.default.svc.cluster.local:5432/zipline',
    return_https: true,
    temp_directory: '/tmp/zipline',
    host: '0.0.0.0',
    port: 3000,
    logger: false,
    stats_interval: 1800,
    invites_interval: 1800,
    thumbnails_interval: 600,
    compression: { enabled: false, threshold: 2048, on_dashboard: true }
  },
  datasource: {
    type: 's3',
    local: { directory: './uploads' },
    s3: {
      access_key_id: 'censored',
      secret_access_key: 'censored',
      endpoint: 'rook-ceph-rgw-ceph-objectstore.rook-ceph.svc',
      bucket: 'zipline-v1',
      port: 80,
      force_s3_path: true,
      region: 'us-east-1',
      use_ssl: false
    }
  },
  uploader: {
    default_format: 'DATE',
    route: '/censored',
    embed_route: '/censored',
    length: 6,
    admin_limit: 107374182400,
    user_limit: 524288000,
    disabled_extensions: [ 'ps1', 'pdf', 'bat', 'exe', 'sh', 'fish' ],
    format_date: 'YYYY-MM-DD_HH-mm-ss',
    default_expiration: null,
    assume_mimetypes: false
  },
  urls: { route: '/censored', length: 6 },
  ratelimit: { user: 5, admin: 1 },
  website: {
    title: 'Zipline',
    show_files_per_user: false,
    show_version: true,
    disable_media_preview: false,
    external_links: [
      {
        label: 'Powered by Zipline',
        link: 'https://github.com/diced/zipline'
      }
    ]
  },
  discord: null,
  oauth: null,
  features: {
    invites: false,
    invites_length: 16,
    oauth_registration: true,
    oauth_login_only: false,
    user_registration: false,
    headless: false,
    default_avatar: null,
    robots_txt: false,
    thumbnails: false
  },
  chunks: { max_size: 94371840, chunks_size: 20971520, enabled: true },
  mfa: { totp_issuer: 'Zipline', totp_enabled: false },
  exif: { enabled: false, remove_gps: true },
  ssl: null
}```
@kashalls kashalls added the bug Something isn't working label Sep 2, 2023
@github-actions github-actions bot added this to the 3.7.1 milestone Sep 2, 2023
@kashalls
Copy link
Contributor Author

kashalls commented Sep 2, 2023

I'm not too familiar with next, but I would assume the issue is here with the truthyness of these statements here:
https://github.com/diced/zipline/blob/713f857e28caa4b3b7eb72f88625b31c7be8adc6/src/lib/middleware/getServerSideProps.ts#L29C14-L29C32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant