Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ids with trailing spaces and trailing tabs are not supported by Fauxton while valid for CouchDB #1240

Closed
jausions opened this issue Oct 30, 2019 · 1 comment
Assignees

Comments

@jausions
Copy link

Trailing white spaces are not supported by Fauxton for document IDs.

Expected Behavior

A document with an id of " with spaces " or "\twith\t\tabs\t" should be accessible from Fauxton.

Current Behavior

The document is listed but clicking it yields a "Does not exist" error.

Possible Solution

Do not trim the trailing white spaces from a document id when building URLs.

Steps to Reproduce (for bugs)

  1. Create 2 documents in a database. One with {"_id": " with space "} and one with {"_id": "\twith\ttabs\t"}.
  2. Navigate with Fauxton to the database.
  3. Notice the 2 documents are present, and hovering the "copy" shows the proper ids.
  4. Click on their name / id to open documents.
  5. "Not found" error is displayed.
  6. Look a the web browser console's network to see that the trailing white spaces were trimmed, while the leading and middle ones were properly URL-encoded.

Context

No special context. Just improper support for some document ids (albeit they probably are seldom used.)

Your Environment

  • Version used: Fauxzton v2.3.1
  • Browser Name and version: Chrome 77.0
  • Operating System and version (desktop or mobile): Windows 10.
@popojargo popojargo self-assigned this Apr 26, 2020
@popojargo
Copy link
Member

Fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants