Failed to import gitea dump authentification source #3871

Closed
opened 2025-11-02 05:29:04 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @PerfectSlayer on GitHub (Aug 29, 2019).

  • Gitea version (or commit ref): 1.8.2
  • Git version: 2.17.1
  • Operating system: CentOS
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When you dump a backup of gitea using gitea dump command, the SQL dump of the authentication source is successfully imported but not working. So it blocks all users from this source to login.

The main issue is the & character in the User filter field which is converted to unicode.
Current value: (&(objectClass=inetOrgPerson)(uid=%s))
Value in SQL: "Filter":"(\u0026(objectClass=inetOrgPerson)(uid=%s))"
Imported value: (\u0026(objectClass=inetOrgPerson)(uid=%s))

Originally created by @PerfectSlayer on GitHub (Aug 29, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.8.2 - Git version: 2.17.1 - Operating system: CentOS - Database: - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When you dump a backup of gitea using `gitea dump` command, the SQL dump of the authentication source is successfully imported but not working. So it blocks all users from this source to login. The main issue is the `&` character in the _User filter_ field which is converted to unicode. Current value: `(&(objectClass=inetOrgPerson)(uid=%s))` Value in SQL: `"Filter":"(\u0026(objectClass=inetOrgPerson)(uid=%s))"` Imported value: `(\u0026(objectClass=inetOrgPerson)(uid=%s))`
GiteaMirror added the issue/staletype/bug labels 2025-11-02 05:29:04 -06:00
Author
Owner

@stale[bot] commented on GitHub (Nov 5, 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 (Nov 5, 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.
Author
Owner

@stale[bot] commented on GitHub (Nov 19, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Nov 19, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3871