From 7fdaa8d6c1d3bb62d4ab2471714c899f0667f5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 22 Aug 2021 09:26:26 +0200 Subject: [PATCH] Testing (#117) * Fix display of login page when logged on SSO (#112) --- .github/ISSUE_TEMPLATE.md | 55 +++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++ check_process | 9 ++- manifest.json | 2 +- pull_request_template.md | 24 -------- scripts/change_url | 1 + .../app-fix-login-page-when-ssoed.patch | 14 +++++ 7 files changed, 94 insertions(+), 27 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 pull_request_template.md create mode 100644 sources/patches/app-fix-login-page-when-ssoed.patch diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## 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) diff --git a/check_process b/check_process index 5499e44..e3779bf 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,8 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" + language="en_GB" with_carddav=1 with_enigma=1 ; Checks @@ -12,6 +13,7 @@ setup_private=0 setup_public=0 upgrade=1 + upgrade=1 from_commit=67cb9813b18254b5f478d9a2974862d0a3af40e5 backup_restore=1 multi_instance=1 port_already_use=0 @@ -19,3 +21,6 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=67cb9813b18254b5f478d9a2974862d0a3af40e5 + name=Merge pull request #108 diff --git a/manifest.json b/manifest.json index cf5aa16..e811bdd 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open Source Webmail software", "fr": "Webmail Open Source" }, - "version": "1.4.11~ynh1", + "version": "1.4.11~ynh2", "url": "https://roundcube.net/", "license": "GPL-3.0-only", "maintainer": { diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index f501dd4..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,24 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how you fix that* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Validation ---- -*Minor decision* -- **Upgrade previous version** : -- [ ] **Code review** : -- [ ] **Approval (LGTM)** : -- [ ] **Approval (LGTM)** : - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/change_url b/scripts/change_url index 8ae2680..87ce1ab 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS diff --git a/sources/patches/app-fix-login-page-when-ssoed.patch b/sources/patches/app-fix-login-page-when-ssoed.patch new file mode 100644 index 0000000..f5c38a9 --- /dev/null +++ b/sources/patches/app-fix-login-page-when-ssoed.patch @@ -0,0 +1,14 @@ +diff -ruN roundcube.orig/index.php roundcube/index.php +--- roundcube.orig/index.php 2021-04-26 14:48:33.169655413 +0200 ++++ roundcube/index.php 2021-04-26 14:54:07.594479133 +0200 +@@ -210,6 +210,10 @@ + if (!$RCMAIL->session->check_auth()) { + $RCMAIL->kill_session(); + $session_error = 'sessionerror'; ++ if (!empty($_SERVER['PHP_AUTH_USER'])) { ++ header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ++ exit; ++ } + } + } +