From be19fc7582016636e002dc68c65802725eaf1466 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 13 May 2021 17:44:40 +0200 Subject: [PATCH 1/2] [autopatch] Update issue and PR templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ pull_request_template.md | 16 ---------- 3 files changed, 71 insertions(+), 16 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 pull_request_template.md 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/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## 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!"* From ca1c1238a8d8f1dc89c092216491d3ec9464382c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 10 Jul 2021 12:49:44 +0200 Subject: [PATCH 2/2] 4.8.1 (#16) * 4.8.1 (#15) * 4.8.1 * Add template * Auto-update README Co-authored-by: Yunohost-Bot <> --- README.md | 50 +- README_fr.md | 67 +- check_process | 11 +- doc/.DS_Store | Bin 0 -> 6148 bytes doc/DISCLAIMER.md | 5 + doc/DISCLAIMER_fr.md | 5 + doc/screenshots/screenshot.png | Bin 0 -> 15900 bytes manifest.json | 10 +- scripts/install | 29 +- scripts/restore | 27 +- scripts/upgrade | 72 +- sources/root_access_disabled/adminer.php | 1257 +++++++++++----------- sources/with_root_access/index.php | 1257 +++++++++++----------- 13 files changed, 1392 insertions(+), 1398 deletions(-) create mode 100644 doc/.DS_Store create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md create mode 100644 doc/screenshots/screenshot.png diff --git a/README.md b/README.md index b2e32d8..06ce8d0 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,44 @@ + + # Adminer for YunoHost [![Integration level](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) -[![Install Adminer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=adminer) +[![Install Adminer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=adminer) *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Adminer quickly and simply on a YunoHost server. +> *This package allows you to install Adminer quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Adminer (formerly phpMinAdmin better alternate to phpMyAdmin) is a full-featured database management tool (MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB). Replace phpMyAdmin with Adminer and you will get a tidier user interface, better support for MySQL features, higher performance and more security. [See detailed comparison](https://www.adminer.org/en/phpmyadmin). -**Shipped version:** 4.8.0 +Database management in a single PHP file + +**Shipped version:** 4.8.1~ynh1 + +**Demo:** https://demo.adminer.org/adminer.php?username= ## Screenshots -![](https://www.adminer.org/static/screenshots/db.png) +![](./doc/screenshots/screenshot.png) -## Demo - -* [Official demo](https://demo.adminer.org/adminer.php?username=) +## Disclaimers / important information ## Configuration You need to know the root password from here `/etc/yunohost/mysql` or the app username and password from `setting.yml` under `/etc/yunohost/apps/appname` to login. -For themes download the adminer.css from the main website and replace the file in the app folder. +For themes download the `adminer.css` from the main website and replace the file in the app folder. If you have problems with drivers see here: https://www.adminer.org/en/drivers. -## YunoHost specific features +## Documentation and resources -#### Multi-user support - - * Are LDAP and HTTP auth supported? **No** - * Can the app be used by multiple users? **Yes** - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/adminer_%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/adminer/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/adminer_%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/adminer/) - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/adminer_ynh/issues - * App website: https://www.adminer.org/ - * Upstream app repository: https://github.com/vrana/adminer/ - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://www.adminer.org/ +* Upstream app code repository: https://github.com/vrana/adminer/ +* YunoHost documentation for this app: https://yunohost.org/app_adminer +* Report a bug: https://github.com/YunoHost-Apps/adminer_ynh/issues ## Developer info @@ -58,3 +50,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/adminer_ynh/tree/test or sudo yunohost app upgrade adminer -u https://github.com/YunoHost-Apps/adminer_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 5ffa594..6466d03 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,65 +1,40 @@ # Adminer pour YunoHost -[![Integration level](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) -[![Installer Adminer avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=adminer) +[![Niveau d'intégration](https://dash.yunohost.org/integration/adminer.svg)](https://dash.yunohost.org/appci/app/adminer) ![](https://ci-apps.yunohost.org/ci/badges/adminer.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/adminer.maintain.svg) +[![Installer Adminer avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=adminer) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Adminer rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Adminer rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Adminer (anciennement phpMinAdmin, meilleure alternative à phpMyAdmin) est un outil de gestion de base de données (MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB). Remplacez phpMyAdmin par Adminer et vous obtiendrez une interface utilisateur plus ordonnée, une meilleure prise en charge des fonctionnalités MySQL, des performances plus élevées et plus de sécurité. [Voir comparaison détaillée](https://www.adminer.org/en/phpmyadmin). -**Version incluse :** 4.8.0 +Gestionnaire de base de données en un seul fichier PHP + +**Version incluse :** 4.8.1~ynh1 + +**Démo :** https://demo.adminer.org/adminer.php?username= ## Captures d'écran -![](https://www.adminer.org/static/screenshots/db.png) +![](./doc/screenshots/screenshot.png) -## Démo - -* [Démo officielle](https://demo.adminer.org/adminer.php?username=) +## Avertissements / informations importantes ## Configuration Vous devez connaître le mot de passe root à partir d'ici `/etc/yunohost/mysql` ou le nom d'utilisateur et le mot de passe de l'application dans `setting.yml` sous `/etc/yunohost/apps/appname` pour vous connecter. -Pour les thèmes, téléchargez le fichier adminer.css depuis le site Web principal et placez le fichier dans le dossier de l'application. +Pour les thèmes, téléchargez le fichier `adminer.css` depuis le site Web principal et placez le fichier dans le dossier de l'application. Si vous rencontrez des problèmes avec les pilotes, consultez : https://www.adminer.org/en/drivers. -## Documentation +## Documentations et ressources - * Documentation officielle : Lien vers la documentation officielle de cette application. - * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. - -## Caractéristiques spécifiques YunoHost - -#### Support multi-utilisateur - -* L'authentification LDAP et HTTP est-elle prise en charge ? **Non** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/adminer_%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/adminer/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/adminer_%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/adminer/) - -## Limitations - -* Limitations connues. - -## Additional information - -* Autres informations que vous souhaitez ajouter sur cette application. - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/adminer_ynh/issues - * Site de l'application : https://www.adminer.org/ - * Dépôt de l'application principale : https://github.com/vrana/adminer/ - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://www.adminer.org/ +* Dépôt de code officiel de l'app : https://github.com/vrana/adminer/ +* Documentation YunoHost pour cette app : https://yunohost.org/app_adminer +* Signaler un bug : https://github.com/YunoHost-Apps/adminer_ynh/issues ## Informations pour les développeurs @@ -68,6 +43,8 @@ Merci de faire vos pull request sur la [branche testing](https://github.com/Yuno Pour essayer la branche testing, procédez comme suit. ``` sudo yunohost app install https://github.com/YunoHost-Apps/adminer_ynh/tree/testing --debug -or +ou sudo yunohost app upgrade adminer -u https://github.com/YunoHost-Apps/adminer_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index 44c97a8..26f0c64 100644 --- a/check_process +++ b/check_process @@ -1,13 +1,9 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) + domain="domain.tld" + path="/path" root_access=0 - is_public=1 (PUBLIC|public=1|private=0) - + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 @@ -18,7 +14,6 @@ upgrade=1 backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= anmol@datamol.org diff --git a/doc/.DS_Store b/doc/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c90376b56b73b627c519d1a34c5d8c9abb7004dc GIT binary patch literal 6148 zcmeHKyG{c^3>-s>NNG}1?l15Mt0;UyegFv&DbPhqfch%Fi%(bFB<-Yt6!=#P*lfL7ulP#UTPH8)y|&RG>0a|qcjG!J4AG8> j(T=(Cc6=8_S=W5c^IkY62A%n!6ZJFTy2zx!wH5dQ#>Eyj literal 0 HcmV?d00001 diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..51982ab --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,5 @@ +## Configuration + +You need to know the root password from here `/etc/yunohost/mysql` or the app username and password from `setting.yml` under `/etc/yunohost/apps/appname` to login. +For themes download the `adminer.css` from the main website and replace the file in the app folder. +If you have problems with drivers see here: https://www.adminer.org/en/drivers. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..010d328 --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,5 @@ +## Configuration + +Vous devez connaître le mot de passe root à partir d'ici `/etc/yunohost/mysql` ou le nom d'utilisateur et le mot de passe de l'application dans `setting.yml` sous `/etc/yunohost/apps/appname` pour vous connecter. +Pour les thèmes, téléchargez le fichier `adminer.css` depuis le site Web principal et placez le fichier dans le dossier de l'application. +Si vous rencontrez des problèmes avec les pilotes, consultez : https://www.adminer.org/en/drivers. diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..09c33093f59b1ecf890772210f23a8d59e8107ca GIT binary patch literal 15900 zcmch;WmH^Cw>H{@9kg*t6C^kUZ6FXJ5P}2?PH+j02e;rFnnnWz3mzo61a}FIySux) z``2Xe{hoK9`<`*ny+6J+28>#@s%q7&Rr8s1)_gipK~4e-<0%FJ0Kk%x6jK5K{r~|0 zkMz-y5jC2sK5YO1GC)D*{oDKd`@OwAM5R|!H2~nfws$kQaN9L;*)n|IIB-$lcV5$T zQq_G{*>zgpabDVf`m^<9X6uzf8Ze;OhVD_eO`nGHGwqxSDb?gQ{d{ftVRo!_! zv3xT)ciTB}(>i+7I(*YGaML?|(=mEo+jm>nbKEz3+c9=s(|c3hdo2s`tL(k$nz(Hm zzOLxIuIRn4?mjN-IIADNF7Lf6?>sJUKWiSng^%9UjNFv;Ul(^@m3EvKG@n%t-;@sC z{OrB{*?m>gandw&T`_oF(0N(hcAVFAQrUf3-FIExe_hghUD$D6)Os|%d{NnUSk-wn zxqLP|d!Ln+<>chFyu7@yu&}G11uA2!qA<_xHE9 zwhj*u4-6dC)lGi=nq_Y8J~J~@TwL7M)%D{?y{4vVS=m5y^J0E}dt6-H&CT`c@!`?I z&f)&{_Qulj;oi~yhDTf>of;G%;6NpP%k-t(~2noShw?o*o?@ zY@eMSot_>Z9&BxIES{Vk9PDpytuGuO@9*zzY_2UF9qsMyu5YZ)pPcL;AMYI&+PASZf`BGE=?aCY;A2Ut}IRN zY_Dx^uWmk+rxs>MPLB2)+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w5Dv`<$<9I8s2xp>ZZOMbEhG~g5Z;8&fcUZtO#UemmVfK+D}7?(crWu1TCpbp=Fcf?Z)UpnXBT5jZA;XcNSPk-cLIQ z-Am#gr%uKg+*thDk17h1CYU4_WA{qm`czg#Li|k(1ju~!8l|WU-OXTY^xXXik}6*n z;-|R(AFns;*&#vIudJ{EKqLe;Twtr39}Xy@$1QBg-}@4Cp1bO7FkhlnyC-LlU`x71 zjQ+4L_WGvuu2$96lno$*Oa;6apKFxZ4UVy=L09JocNM?VohLAbsONB90lX(gdpO8I zr$jL-KTw#>F89>Q*TnhKP6f@JB3|htsEv&0U2_x(SO6VrhG*ZFTP4XITeolv_OUrR zioT&u=E=DjVt0sbJ;rNCJpe3_;FnAj1g5`2-v2dafi=Y#EL0JxS*{T(%~D^)+vpWWRa3D2+BXPog2_+meoc;r$<_y(;HFqRKzVK6wK@N z0>K(r@patWF@{cZilR@?wxTt&envFFUojL3pUosgY`zMsH^!uWNxg=GHui`gc>l^L ga1@_+L!rF9Z_eq6!mGeVd5~D@t(;h)h~DS_11xn4(f|Me literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest.json index 9e8a926..46b48eb 100644 --- a/manifest.json +++ b/manifest.json @@ -7,8 +7,14 @@ "fr": "Gestionnaire de base de données en un seul fichier PHP" }, - "version": "4.8.0~ynh1", + "version": "4.8.1~ynh1", "url": "https://www.adminer.org/", + "upstream": { + "license": "Apache-2.0", + "website": "https://www.adminer.org/", + "demo": "https://demo.adminer.org/adminer.php?username=", + "code": "https://github.com/vrana/adminer/" + }, "license": "Apache-2.0", "maintainer": { "name": "Anmol Sharma", @@ -21,7 +27,7 @@ "url": "https://github.com/jesuisfol/adminer_ynh" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 0c7f432..667f176 100644 --- a/scripts/install +++ b/scripts/install @@ -45,6 +45,14 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=root_access --value=$root_access +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=2 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -63,23 +71,10 @@ if [[ $root_access -eq 1 ]]; then cp -a ../sources/root_access_disabled/. $final_path fi -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R www-data:www-data $final_path -chmod 755 -R $final_path/adminer.php +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chmod 755 $final_path/adminer.php #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 579cde3..16ba223 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,6 +46,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -53,21 +61,10 @@ ynh_script_progression --message="Restoring Adminer main directory..." --weight= ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= - -# Restore permissions to app files -chown -R www-data:www-data $final_path -chmod 755 -R $final_path/adminer.php +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chmod 755 $final_path/adminer.php #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 53faa4c..c3adec7 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,6 +22,26 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) root_access=$(ynh_app_setting_get --app=$app --key=root_access) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +#================================================= +# CHECK VERSION +#================================================= + +upgrade_type=$(ynh_check_app_version_changed) + +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Adminer before upgrading (may take a while)..." --weight=3 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -40,48 +60,38 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up Adminer before upgrading (may take a while)..." --weight=3 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # CREATE DEDICATED USER #================================================= ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir="$final_path" -# Copy source files -ynh_secure_remove $final_path +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= -mkdir -p $final_path +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + # Copy source files + ynh_secure_remove $final_path -if [[ $root_access -eq 1 ]]; then -#copy files from with_root_access folder to the final_path - cp -a ../sources/with_root_access/. $final_path - else - #copy files from root_access_disabled folder to the final_path - cp -a ../sources/root_access_disabled/. $final_path + mkdir -p $final_path + + if [[ $root_access -eq 1 ]]; then + #copy files from with_root_access folder to the final_path + cp -a ../sources/with_root_access/. $final_path + else + #copy files from root_access_disabled folder to the final_path + cp -a ../sources/root_access_disabled/. $final_path + fi fi -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chmod 755 -R $final_path/adminer.php -chown -R www-data:www-data $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chmod 755 $final_path/adminer.php #================================================= # NGINX CONFIGURATION diff --git a/sources/root_access_disabled/adminer.php b/sources/root_access_disabled/adminer.php index b9ce4d0..762aaaf 100644 --- a/sources/root_access_disabled/adminer.php +++ b/sources/root_access_disabled/adminer.php @@ -5,56 +5,56 @@ * @copyright 2007 Jakub Vrana * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) -* @version 4.8.0 +* @version 4.8.1 */function -adminer_errors($Ac,$Cc){return!!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~',$Cc);}error_reporting(6135);set_error_handler('adminer_errors',2);$Yc=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($Yc||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Hi=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Hi)$$X=$Hi;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");function +adminer_errors($Cc,$Ec){return!!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~',$Ec);}error_reporting(6135);set_error_handler('adminer_errors',E_WARNING);$ad=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($ad||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Ii=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Ii)$$X=$Ii;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");function connection(){global$g;return$g;}function adminer(){global$b;return$b;}function version(){global$ia;return$ia;}function -idf_unescape($v){$pe=substr($v,-1);return -str_replace($pe.$pe,$pe,substr($v,1,-1));}function +idf_unescape($v){if(!preg_match('~^[`\'"]~',$v))return$v;$qe=substr($v,-1);return +str_replace($qe.$qe,$qe,substr($v,1,-1));}function escape_string($X){return substr(q($X),1,-1);}function number($X){return preg_replace('~[^0-9]+~','',$X);}function number_type(){return'((?$W){unset($sg[$z][$ge]);if(is_array($W)){$sg[$z][stripslashes($ge)]=$W;$sg[]=&$sg[$z][stripslashes($ge)];}else$sg[$z][stripslashes($ge)]=($Yc?$W:stripslashes($W));}}}}function -bracket_escape($v,$Na=false){static$ti=array(':'=>':1',']'=>':2','['=>':3','"'=>':4');return -strtr($v,($Na?array_flip($ti):$ti));}function -min_version($Yi,$Ce="",$h=null){global$g;if(!$h)$h=$g;$mh=$h->server_info;if($Ce&&preg_match('~([\d.]+)-MariaDB~',$mh,$C)){$mh=$C[1];$Yi=$Ce;}return(version_compare($mh,$Yi)>=0);}function +remove_slashes($tg,$ad=false){if(function_exists("get_magic_quotes_gpc")&&get_magic_quotes_gpc()){while(list($z,$X)=each($tg)){foreach($X +as$he=>$W){unset($tg[$z][$he]);if(is_array($W)){$tg[$z][stripslashes($he)]=$W;$tg[]=&$tg[$z][stripslashes($he)];}else$tg[$z][stripslashes($he)]=($ad?$W:stripslashes($W));}}}}function +bracket_escape($v,$Na=false){static$ui=array(':'=>':1',']'=>':2','['=>':3','"'=>':4');return +strtr($v,($Na?array_flip($ui):$ui));}function +min_version($Zi,$De="",$h=null){global$g;if(!$h)$h=$g;$nh=$h->server_info;if($De&&preg_match('~([\d.]+)-MariaDB~',$nh,$C)){$nh=$C[1];$Zi=$De;}return(version_compare($nh,$Zi)>=0);}function charset($g){return(min_version("5.5.3",0,$g)?"utf8mb4":"utf8");}function -script($xh,$si="\n"){return"$xh$si";}function -script_src($Mi){return"\n";}function +script($yh,$ti="\n"){return"$yh$ti";}function +script_src($Ni){return"\n";}function nonce(){return' nonce="'.get_nonce().'"';}function target_blank(){return' target="_blank" rel="noreferrer noopener"';}function h($P){return str_replace("\0","�",htmlspecialchars($P,ENT_QUOTES,'utf-8'));}function nl_br($P){return str_replace("\n","
",$P);}function -checkbox($D,$Y,$db,$le="",$tf="",$hb="",$me=""){$I="".($tf?script("qsl('input').onclick = function () { $tf };",""):"");return($le!=""||$hb?"$I".h($le)."":$I);}function -optionlist($zf,$fh=null,$Qi=false){$I="";foreach($zf -as$ge=>$W){$_f=array($ge=>$W);if(is_array($W)){$I.='';$_f=$W;}foreach($_f -as$z=>$X)$I.=''.h($X);if(is_array($W))$I.='';}return$I;}function -html_select($D,$zf,$Y="",$sf=true,$me=""){if($sf)return"".(is_string($sf)?script("qsl('select').onchange = function () { $sf };",""):"");$I="";foreach($zf +checkbox($D,$Y,$db,$me="",$uf="",$hb="",$ne=""){$I="".($uf?script("qsl('input').onclick = function () { $uf };",""):"");return($me!=""||$hb?"$I".h($me)."":$I);}function +optionlist($_f,$gh=null,$Ri=false){$I="";foreach($_f +as$he=>$W){$Af=array($he=>$W);if(is_array($W)){$I.='';$Af=$W;}foreach($Af +as$z=>$X)$I.=''.h($X);if(is_array($W))$I.='';}return$I;}function +html_select($D,$_f,$Y="",$tf=true,$ne=""){if($tf)return"".(is_string($tf)?script("qsl('select').onchange = function () { $tf };",""):"");$I="";foreach($_f as$z=>$X)$I.="";return$I;}function -select_input($Ia,$zf,$Y="",$sf="",$eg=""){$Xh=($zf?"select":"input");return"<$Xh$Ia".($zf?">