YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
144 stars 62 forks source link

fix nginx config #683

Closed Gofannon closed 2 months ago

Gofannon commented 2 months ago

Problem

  1. found a small security issue running gixy against a server of mine
>> Problem: [http_splitting] Possible HTTP-Splitting vulnerability.
Description: Using variables that can contain "\n" or "\r" may lead to http injection.
Additional info: https://github.com/yandex/gixy/blob/master/docs/en/plugins/httpsplitting.md
Reason: At least variable "$uri" can contain "\n"
Pseudo config:

include /etc/nginx/conf.d/nextcloud.server.com.conf;

    server {
        server_name nextcloud.server.com;

        include /etc/nginx/conf.d/nextcloud.server.com.d/nextcloud.conf;

            location ^~ /.well-known {

                location = /.well-known/nodeinfo {
                    return 301 /index.php$uri;
                }
            }
    }

Solution

PR Status

Automatic tests

Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)