nextcloud / nextcloud/notify_push

PostgreSQL auth fails when the password contains `\`

Open
#148 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
344
Forks
64
Avg merge
2d 10h
Merged PRs (30d)
5

Description

Steps to reproduce:

  • Change your Nextcloud user password to one that includes the backwards slash (\)
  • Change the config.php file to use the password, properly escaping the backwards slash with another backwards slash
  • Start notify_push daemon

What happens:

I get this message:

Error: 
   0: Failed to connect to Nextcloud database
   1: error returned from database: password authentication failed for user "nextcloud"
   2: password authentication failed for user "nextcloud"
Location:
   /tmp/krankerl.UyibIgt7EFoA/notify_push/src/storage_mapping.rs:58
Backtrace omitted.
Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

What should happen:

notify_push should have started without errors


First of all, thanks for this great piece of software! I've been using Nextcloud for many years now, and is the most reliable part of my home server setup

And, although this was a no issue for me, as simply changing the password to one that doesn't use \ solved the issue, if this is just a case of interpreting character escape sequences, I think its worth at least noticing in the docs that this can happen, so I'm reporting this bug.

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 at notify_push/src/storage_mapping.rs around line 58 and reproduce the daemon startup with a PostgreSQL password containing a backslash. Trace the database connection handling and verify that notify_push starts successfully with the escaped password.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, rust
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.