REQUIRE_SIGNIN_VIEW not working #3573

Closed
opened 2025-11-02 05:17:45 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @hb-i on GitHub (Jul 11, 2019).

  • Gitea version (or commit ref): 1.8.3
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I have REQUIRE_SIGNIN_VIEW set to true in app.ini. However, you can still view and explore the site and repos without signing in. I've tried restarting the service and server multiple times.

Screenshots

image

Originally created by @hb-i on GitHub (Jul 11, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.3 - Git version: 2.17.1 - Operating system: Ubuntu 18.04 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description I have REQUIRE_SIGNIN_VIEW set to true in app.ini. However, you can still view and explore the site and repos without signing in. I've tried restarting the service and server multiple times. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![image](https://user-images.githubusercontent.com/27036750/61078777-ab172a00-a3de-11e9-918c-e0c5d710d2ba.png)
GiteaMirror added the type/question label 2025-11-02 05:17:45 -06:00
Author
Owner

@jolheiser commented on GitHub (Jul 11, 2019):

Just to confirm, when running Gitea, can you navigate to www.yourgitea.com/admin/config as an admin and check that Require Sign-In to View Pages in the Service Configuration section is marked?

If you want to navigate there manually:

  1. Go to Site Administration (in the dropdown when clicking on your profile in the upper-right corner)
  2. Click the Configuration tab
  3. Scroll down to Server Configuration

Just want to make sure it's picking up the correct app.ini and not something else by accident.

@jolheiser commented on GitHub (Jul 11, 2019): Just to confirm, when running Gitea, can you navigate to `www.yourgitea.com/admin/config` as an admin and check that `Require Sign-In to View Pages` in the `Service Configuration` section is marked? If you want to navigate there manually: 1. Go to `Site Administration` (in the dropdown when clicking on your profile in the upper-right corner) 2. Click the `Configuration` tab 3. Scroll down to `Server Configuration` Just want to make sure it's picking up the correct `app.ini` and not something else by accident.
Author
Owner

@hb-i commented on GitHub (Jul 11, 2019):

Just to confirm, when running Gitea, can you navigate to www.yourgitea.com/admin/config as an admin and check that Require Sign-In to View Pages in the Service Configuration section is marked?

If you want to navigate there manually:

  1. Go to Site Administration (in the dropdown when clicking on your profile in the upper-right corner)
  2. Click the Configuration tab
  3. Scroll down to Server Configuration

Just want to make sure it's picking up the correct app.ini and not something else by accident.

image

It's not marked. It's weird because it is picking the right app.ini file because when I enable/disable the DISABLE_REGISTRATION option, I can see the Register button appear and disappear at the top right after I restart service.

@hb-i commented on GitHub (Jul 11, 2019): > Just to confirm, when running Gitea, can you navigate to `www.yourgitea.com/admin/config` as an admin and check that `Require Sign-In to View Pages` in the `Service Configuration` section is marked? > > If you want to navigate there manually: > > 1. Go to `Site Administration` (in the dropdown when clicking on your profile in the upper-right corner) > 2. Click the `Configuration` tab > 3. Scroll down to `Server Configuration` > > Just want to make sure it's picking up the correct `app.ini` and not something else by accident. ![image](https://user-images.githubusercontent.com/27036750/61080303-03036000-a3e2-11e9-9b56-485d37c20d6a.png) It's not marked. It's weird because it is picking the right app.ini file because when I enable/disable the `DISABLE_REGISTRATION` option, I can see the Register button appear and disappear at the top right after I restart service.
Author
Owner

@jolheiser commented on GitHub (Jul 11, 2019):

Can you provide me with

  1. The path to your app.ini
  2. The command you (or the service) is using to start Gitea

You can scrub anything if necessary, just make sure like paths are scrubbed the same.

I'm still thinking it's a configuration thing somewhere if it's not picking up that change.

@jolheiser commented on GitHub (Jul 11, 2019): Can you provide me with 1. The path to your `app.ini` 2. The command you (or the service) is using to start Gitea You can scrub anything if necessary, just make sure like paths are scrubbed the same. I'm still thinking it's a configuration thing somewhere if it's not picking up that change.
Author
Owner

@hb-i commented on GitHub (Jul 11, 2019):

Can you provide me with

  1. The path to your app.ini
  2. The command you (or the service) is using to start Gitea

You can scrub anything if necessary, just make sure like paths are scrubbed the same.

I'm still thinking it's a configuration thing somewhere if it's not picking up that change.

Here you go.

https://pastebin.com/KLDQeLyv

Edit: I'm using sudo systemctl start/stop gitea.service to run and stop the service. I've also tried sudo service gitea stop/start

Thanks.

@hb-i commented on GitHub (Jul 11, 2019): > Can you provide me with > > 1. The path to your `app.ini` > 2. The command you (or the service) is using to start Gitea > > You can scrub anything if necessary, just make sure like paths are scrubbed the same. > > I'm still thinking it's a configuration thing somewhere if it's not picking up that change. Here you go. https://pastebin.com/KLDQeLyv Edit: I'm using `sudo systemctl start/stop gitea.service` to run and stop the service. I've also tried `sudo service gitea stop/start` Thanks.
Author
Owner

@jolheiser commented on GitHub (Jul 11, 2019):

You have REQUIRE_SIGNIN_VIEW declared twice.

In the pastebin, lines 44 and 50.

@jolheiser commented on GitHub (Jul 11, 2019): You have `REQUIRE_SIGNIN_VIEW` declared twice. In the pastebin, lines 44 and 50.
Author
Owner

@hb-i commented on GitHub (Jul 11, 2019):

You have REQUIRE_SIGNIN_VIEW declared twice.

In the pastebin, lines 44 and 50.

That's embarrassing. Thank you. It worked!
image

@hb-i commented on GitHub (Jul 11, 2019): > You have `REQUIRE_SIGNIN_VIEW` declared twice. > > In the pastebin, lines 44 and 50. That's embarrassing. Thank you. It worked! ![image](https://user-images.githubusercontent.com/27036750/61081570-c08f5280-a3e4-11e9-9757-e6ceac47394b.png)
Author
Owner

@jolheiser commented on GitHub (Jul 11, 2019):

Happy to help! 😄

@jolheiser commented on GitHub (Jul 11, 2019): Happy to help! 😄
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3573