nextcloud / nextcloud/updater

Permanent changes to the web server configuration (.htaccess)

Open
#404 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement hotspot: local changes
Dominant language
PHP
Stars
51
Forks
40
Avg merge
2d 19h
Merged PRs (30d)
3

Description

Some provider environments do not allow you to change the basic web server configuration to allow only https access. A common work-around is to set up a redirection in the .htaccess file in the root directory of the webapp (Nextcloud).

Unfortunately, when upgrading the software of Nextcloud, it happens again and again that the .htaccess file is replaced. As a result, this redirection is lost again.
I see this as a security risk, since the login data of an inexperienced users may be transmitted unencrypted.

Although I try to check and update the .htacces file after each upgrade. But, sometimes this get forgotten.

Is there any way to preserve these customizations in the .htaccess file across software upgrades?
I can imagine this in different ways. For example,

  • the .htaccess file has a marked area that is transferred to the new .htaccess file.
  • a small app handles extensions to the .htaccess file (similar to the app Custom CSS). However, the upgrade process should add these extensions before the first access to Nextcloud.

Regards,
Friedbert

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining how the updater replaces the root .htaccess file during software upgrades. Define how custom HTTPS-redirection changes can survive that replacement, then verify the behavior across an upgrade without losing the existing customization.

Written by the indexing model from the issue text.

Assessment

Tech stack
apache, php
Domain
infrastructure, release, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.