Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 54.9k
    • Issues 54.9k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1.5k
    • Merge requests 1.5k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #208682
Closed (duplicated) (duplicated)
Open
Issue created Mar 02, 2020 by Markus Koller@toupeira⚗Contributor

Wiki doesn't handle "~" in page paths correctly

Summary

When using a ~ in a wiki page title, we create a ~ directory in the wiki repository and store the page there, but the ~ is expanded to the GitLab user's home directory /var/opt/gitlab in some situations.

Steps to reproduce

  1. Create a wiki page with the title ~/test and some content.

What is the current bug behavior?

  • In the wiki sidebar navigation, the page's directory gets displayed as var/opt/gitlab.
  • Opening the page uses the expanded directory in the URL.
  • When trying to delete the page, GitLab aborts with a 503 error.
  • When trying to edit the page, GitLab responds with a validation error Someone edited the page the same time you did.

What is the expected correct behavior?

  • We should never expand ~ into the home directory, and display it as a literal ~ instead.
  • Editing and deleting a page with ~ in the path or title should work without errors.

Relevant logs and/or screenshots

Customer ticket: https://gitlab.zendesk.com/agent/tickets/148330

Wrong path in sidebar:

image

Output of checks

This bug happens on GitLab.com

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited Mar 02, 2020 by Markus Koller
Assignee
Assign to
Time tracking