dump sql quote #3240

Closed
opened 2025-11-02 05:05:11 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @fragfutter on GitHub (Apr 24, 2019).

  • Gitea version (or commit ref): 1.7.2
  • Git version: 1.8.3.1
  • Operating system: rhel7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

gitea provides a dump command to get a backup of repositories and database.

The documentation for the restore https://docs.gitea.io/en-us/backup-and-restore/ explains how to import the sql dump. Unfortunately the sql dump is not using double escapes for backslashes.

For example the ampersand character & is dumped as \u0026 (single backslash). During import this will be imported as the string u0026. The dump should contain a \\u0026 (double backslash).

Originally created by @fragfutter on GitHub (Apr 24, 2019). - Gitea version (or commit ref): 1.7.2 - Git version: 1.8.3.1 - Operating system: rhel7 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: ## Description gitea provides a dump command to get a backup of repositories and database. The documentation for the restore https://docs.gitea.io/en-us/backup-and-restore/ explains how to import the sql dump. Unfortunately the sql dump is not using double escapes for backslashes. For example the ampersand character & is dumped as \\u0026 (single backslash). During import this will be imported as the string u0026. The dump should contain a \\\\u0026 (double backslash).
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 05:05:11 -06:00
Author
Owner

@stale[bot] commented on GitHub (Jun 24, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 24, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3240