[RÉSOLU] Login to Gotify failed after update (La connexion à Gotify a échoué après la mise à jour)

What app is this about, and its version: Gotify Version 2.9.0~ynh1
What YunoHost version are you running: YunoHost 12.1.39 (stable)
What type of hardware are you using: VPS bought online

Describe your issue

:fr:
Bonjour,

Je viens de faire la mise à jour de Gotify Version 2.8.0~ynh1, vers la Version 2.9.0~ynh1, tout s’est bien passé pendant la mise à jour, pas de soucis.
Mais quand je veux me connecter, j’ai un message « login failed ».
J’ai vérifié dans les fichiers :
/etc/yunohost/apps/gotify/conf/config.yml
nano /var/www/gotify/config.yml
Tout est correct.
J’ai désinstallé Gotify et refait la mise à jour, ça ne résout pas le problème, j’ai toujours ce message « login failed ».

J’ai désinstallé à nouveau pour remettre la Version 2.8.0~ynh1 qui fonctionne bien.

Est-ce un bug ?
Merci pour votre aide.

:gb:
Hello.

I just updated Gotify Version 2.8.0~ynh1, to Version 2.9.0~ynh1, everything went well during the update, no worries.
But when I want to connect, I have a " login failed" message.
I checked the files:
/etc/yunohost/apps/gotify/conf/config.yml
nano /var/www/gotify/config.yml
It’s all right.
I uninstalled Gotify and re-update, it doesn’t solve the problem, I still have this message " login failed".

I uninstalled again to release version 2.8.0~ynh1 that works well.

Is this a bug?
Thanks for your help.

Share relevant logs or error messages

Je n’ai pas de message d’erreur - I don’t have an error message.

Il ne semble pas y avoir de solution apparemment :

Je viens de mettre à jour mon instance gotify sans soucis.

As-tu des caractères spéciaux dans ton mot de passe ?

Oui, j’ai des caractères spéciaux, mais ç’a toujours fonctionné jusqu’ici et je n’ai jamais eu de problème pour me connecter.
Et les mises à jour précédentes n’ont jamais posé de soucis.

J’ai essayé avec mysql et MariaDB [gotify]>, j’ai tapé help, help contents pour voir si je pouvais faire quelque chose à ce niveau-là… un reset pour réinitialiser, un UNLOCK pour débloquer… mais je n’ai pas assez de connaissance concernant les commandes mysql pour Gotify.

Ça fait deux jours que je cherche partout (forums, sites…) pour trouver la solution à ce problème, je ne considère pas comme résolu, je laisse tomber les recherches.

PAS DE SOLUTION, NON RÉSOLU.
Je vais voir avec ntfy comme solution de remplacement.

Merci à toi @jarod5001

Peux-tu essayer de supprimer les caractères spéciaux de ton mot de passe et identifier lequel est problématique ? Sinon tu peux utiliser la version précédente en attendant de trouver une solution.

Fait, pour les deux que tu proposes.
J’ai même modifié le contenu du fichier config.yml

defaultuser: # on database creation, gotify creates an admin user
  name: monID # the username of the default user
  pass: monpassword_p@55w0rd24f*& # the password of the default user

en :

defaultuser: # on database creation, gotify creates an admin user
  name: admin # the username of the default user
  pass: admin # the password of the default user

Et ça ne change rien, j’ai fait de même avec la version précédente et bizarrement, ça n’a aucun impact.
Comme si le fichier .yml ne servait plus à rien.
J’ai même désinstallé Gotify et fait une nouvelle installation, pareil, ça ne change rien.

C’est quelque chose qui bloque ailleurs, mais je ne sais pas où.

Pour l’instant, je garde la Version 2.8.0~ynh1, ce qui va me laisser le temps de mettre en place ntfy et revoir les scripts pour les adapter avec ntfy .

Pour les applications qui ont un service, il faut le redemander après tout changement des fichiers de configuration pour que les changements soient pris en compte.

Il se peut ausdsi qu’il y ait un binz avec les headers d’authentification.
Peux-tu tester ceci:

  • réinstaller gotify (avec mot de passe admin identique à celui du compte choisi comme admin)
  • tester ensuite la connexion sur gotify :
    a) en étant en même temps connecté au portail YNH avec cet utilisateur
    b) sans être connecté au portail avec cet utilisateur
    et nous dire ce que cela donne ?
    Je ferai aussi le test en rentrant.

Y avait-il le patch des headers sur la version précédente?

Oui

Testing by Thovi98 · Pull Request #81 · YunoHost-Apps/gotify_ynh · GitHub

Si tu as le temps, peux tu proposer une PR ?

1 Like

J’ai déjà effectué ces manips, ça ne change rien au problème.

Par contre, dans le fichier /var/www/gotify/config.yml quel que soit le nom d’utilisateur et mot de passe que je mets (différent à chaque fois pour tester), je peux toujours me connecter avec Version 2.8.0~ynh1 et toujours rien avec Version 2.9.0~ynh1.

Il y a quelque chose qui bloque, mais je ne sais pas où.
Dans la sauvegarde, gotify-pre-upgrade1 (Version 2.8.0~ynh1), j’ai récupéré ce fichier db.sql et je me demandais s’il n’y avait pas un truc là-dedans qui pourrait m’aider.

/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: gotify
-- ------------------------------------------------------
-- Server version	10.11.14-MariaDB-0+deb12u2

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `applications`
--

DROP TABLE IF EXISTS `applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `applications` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `token` varchar(180) DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `name` text DEFAULT NULL,
  `description` text DEFAULT NULL,
  `internal` tinyint(1) DEFAULT NULL,
  `image` text DEFAULT NULL,
  `default_priority` bigint(20) DEFAULT NULL,
  `last_used` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_applications_id` (`id`),
  UNIQUE KEY `uix_applications_token` (`token`),
  KEY `idx_applications_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `applications`
--

LOCK TABLES `applications` WRITE;
/*!40000 ALTER TABLE `applications` DISABLE KEYS */;
INSERT INTO `applications` VALUES
(2,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png',5,'datetime'),
(5,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.uPl.png',5,'datetime'),
(7,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(8,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(23,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(24,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.D.png',5,'datetime'),
(25,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png-172ZT.png',5,'datetime'),
(26,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(27,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(28,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'p.im01.png.png',5,'datetime');
/*!40000 ALTER TABLE `applications` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `clients`
--

DROP TABLE IF EXISTS `clients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `clients` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `token` varchar(180) DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `name` text DEFAULT NULL,
  `last_used` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_clients_id` (`id`),
  UNIQUE KEY `uix_clients_token` (`token`),
  KEY `idx_clients_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clients`
--

LOCK TABLES `clients` WRITE;
/*!40000 ALTER TABLE `clients` DISABLE KEYS */;
INSERT INTO `clients` VALUES
(101,'xxxxxxxxxxxxxxx',1,'smartphone','datetime'),
(133,'xxxxxxxxxxxxxxx',1,'smartphone','datetime'),
(142,'xxxxxxxxxxxxxxx',1,'smartphone','datetime');
/*!40000 ALTER TABLE `clients` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `messages`
--

DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) unsigned DEFAULT NULL,
  `message` text DEFAULT NULL,
  `title` text DEFAULT NULL,
  `priority` bigint(20) DEFAULT NULL,
  `extras` longblob DEFAULT NULL,
  `date` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_messages_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=84305 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `messages`
--

LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
INSERT INTO `messages` VALUES
(84303,2,'Message_Gotify','Title_gotify',5,NULL,'datetime'),
(84304,25,'Message_Gotify','Title_gotify',5,NULL,'datetime');
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `plugin_confs`
--

DROP TABLE IF EXISTS `plugin_confs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `plugin_confs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `module_path` text DEFAULT NULL,
  `token` varchar(180) DEFAULT NULL,
  `application_id` bigint(20) unsigned DEFAULT NULL,
  `enabled` tinyint(1) DEFAULT NULL,
  `config` longblob DEFAULT NULL,
  `storage` longblob DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_plugin_confs_token` (`token`),
  KEY `idx_plugin_confs_id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `plugin_confs`
--

LOCK TABLES `plugin_confs` WRITE;
/*!40000 ALTER TABLE `plugin_confs` DISABLE KEYS */;
/*!40000 ALTER TABLE `plugin_confs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(180) DEFAULT NULL,
  `pass` longblob DEFAULT NULL,
  `admin` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_users_id` (`id`),
  UNIQUE KEY `uix_users_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES
(1,'username','$xx$xx$xxxxxx/xxxxxxxxxxx.xxxxxxxxxxxx./xxxxxxxx.xxxxxxxxxx',1);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping routines for database 'gotify'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed

Voici le fichier db.sql de la Version 2.9.0~ynh1

  /*M!999999\- enable the sandbox mode */
-- MariaDB dump 10.19  Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost    Database: gotify
-- ------------------------------------------------------
-- Server version	10.11.14-MariaDB-0+deb12u2

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `applications`
--

DROP TABLE IF EXISTS `applications`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `applications` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `token` varchar(180) DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `name` text DEFAULT NULL,
  `description` text DEFAULT NULL,
  `internal` tinyint(1) DEFAULT NULL,
  `image` text DEFAULT NULL,
  `default_priority` bigint(20) DEFAULT NULL,
  `last_used` datetime(3) DEFAULT NULL,
  `sort_key` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_applications_id` (`id`),
  UNIQUE KEY `uix_applications_token` (`token`),
  UNIQUE KEY `uix_application_user_id_sort_key` (`user_id`,`sort_key`) USING HASH,
  KEY `idx_applications_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `applications`
--

LOCK TABLES `applications` WRITE;
/*!40000 ALTER TABLE `applications` DISABLE KEYS */;
INSERT INTO `applications` VALUES
(2,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png',5,'datetime'),
(5,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.uPl.png',5,'datetime'),
(7,'xxxxxxxxxxxxxxx',1,'Message_Gotify',0,'im01.png.png',5,'datetime'),
(8,'xxxxxxxxxxxxxxx',1,'Message_Gotify',0,'im01.png.png',5,'datetime'),
(23,'xxxxxxxxxxxxxxx',1,'Message_Gotify',0,'im01.png.png',5,'datetime'),
(24,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.D.png',5,'datetime'),
(25,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png-172ZT.png',5,'datetime'),
(26,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(27,'xxxxxxxxxxxxxxx',1,'Message_Gotify','Title_gotify',0,'im01.png.png',5,'datetime'),
(28,'xxxxxxxxxxxxxxx',1,'Message_Gotify',0,'p.im01.png.png',5,'datetime');
/*!40000 ALTER TABLE `applications` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `clients`
--

DROP TABLE IF EXISTS `clients`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `clients` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `token` varchar(180) DEFAULT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `name` text DEFAULT NULL,
  `last_used` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_clients_id` (`id`),
  UNIQUE KEY `uix_clients_token` (`token`),
  KEY `idx_clients_user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=168 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `clients`
--

LOCK TABLES `clients` WRITE;
/*!40000 ALTER TABLE `clients` DISABLE KEYS */;
INSERT INTO `clients` VALUES
(101,'xxxxxxxxxxxxxxx',1,'smartphone','datetime'),
(133,'xxxxxxxxxxxxxxx',1,'smartphone','datetime'),
(142,'xxxxxxxxxxxxxxx',1,'smartphone','datetime');
/*!40000 ALTER TABLE `clients` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `messages`
--

DROP TABLE IF EXISTS `messages`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `application_id` bigint(20) unsigned DEFAULT NULL,
  `message` text DEFAULT NULL,
  `title` text DEFAULT NULL,
  `priority` bigint(20) DEFAULT NULL,
  `extras` longblob DEFAULT NULL,
  `date` datetime(3) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_messages_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=84328 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `messages`
--

LOCK TABLES `messages` WRITE;
/*!40000 ALTER TABLE `messages` DISABLE KEYS */;
INSERT INTO `messages` VALUES
(84303,2,'Message_Gotify','Title_gotify',5,NULL,'datetime'),
(84304,25,'Message_Gotify','Title_gotify',5,NULL,'datetime');
/*!40000 ALTER TABLE `messages` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `plugin_confs`
--

DROP TABLE IF EXISTS `plugin_confs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `plugin_confs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `module_path` text DEFAULT NULL,
  `token` varchar(180) DEFAULT NULL,
  `application_id` bigint(20) unsigned DEFAULT NULL,
  `enabled` tinyint(1) DEFAULT NULL,
  `config` longblob DEFAULT NULL,
  `storage` longblob DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_plugin_confs_token` (`token`),
  KEY `idx_plugin_confs_id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `plugin_confs`
--

LOCK TABLES `plugin_confs` WRITE;
/*!40000 ALTER TABLE `plugin_confs` DISABLE KEYS */;
/*!40000 ALTER TABLE `plugin_confs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `users`
--

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(180) DEFAULT NULL,
  `pass` longblob DEFAULT NULL,
  `admin` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uix_users_id` (`id`),
  UNIQUE KEY `uix_users_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `users`
--

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES
(1,'username','$xx$xx$xxxxxx/xxxxxxxxxxx.xxxxxxxxxxxx./xxxxxxxx.xxxxxxxxxx',1);
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping routines for database 'gotify'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed

Peux-tu faire un essai en ajoutant dans /etc/nginx/conf.d/domain.tld.d/gotify.conf

  proxy_set_header            Authorization $http_authorization;

dans ce bloc

location /gotify/ {
  proxy_pass                  http://127.0.0.1:__PORT__/;
  include proxy_params_no_auth;

  #sub_path_only rewrite ^//gotify(/.*) $1 break;
  proxy_buffering off;
  client_max_body_size        50M;

  more_set_input_headers      'Authorization: $http_authorization';
  proxy_set_header            Authorization $http_authorization; # à ajouter
}

Il faut ensuite relancer nginx

1 Like

le config.yaml ne doit sûrement servir que pour l’initialisation de la bdd.

Yeeees, ça fonctionne :smiley:

Mais pourquoi ?
En tout cas un grand merci :folded_hands:

Ça pourrait servir pour d’autres :smiley:

Oui, dès que j’ai un moment, je vais le faire.

du tout… ?? J’ai perdu le fil.
Le header qui contient les informations de connexion est transmis puis oublié et n’arrive donc finalement pas au backend.

1 Like

Je vois.
En tout cas, merci pour ton aide.

Le correctif proposé par @otm33 est disponible dans la dernière version. Merci à vous deux :victory_hand:

3 Likes