Skip to content

Error when creating / editing files with a leading dot #5652

Closed
@AkiraNorthstar

Description

@AkiraNorthstar
  • Gitea version (or commit ref): 1.6.3 30560b0
  • Git version: 2.20.1 (on host system)
  • Operating system: linux x86_64 / fedora 29
  • Database (use [x]):
    • PostgreSQL
      MySQL
      MSSQL
      SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (see screenshots)
      No
      Not relevant : All variants have the same error (self hosted, try.gitea.io)
  • Log gist: gitea.log and xorm.log

Description

Creating / editing a file with a leading point that it is either not created (screenshot 1 + 2), or if it is created, it does not include the leading point. This phenomenon also occurs when you have an existing file (such as .drone.yml) and edit it via the gitea web editor. This file would renamed to drone.yml (without leading dot)

Tested versions:
1.6.2 (2631f7f) = works
1.6.3 (30560b0) = does not work!
1.7.x (all commits) = do not work!

Each versions are tested with Docker (docs) and as self-compiled rpm packages under fedora 29.
It seems to me that, starting with version 1.6.2, something has changed that causes this error.

Screenshots

The creation of a file with a leading point:
screenshot_2019-01-06 repotest-dot

Error message after commit:
screenshot_2019-01-06 repotest-dot 1

File after creating (without leading dot):
screenshot_2019-01-06 repotest-dot 2

EDIT: add gitea.log and xorm.log

Activity

zeripath

zeripath commented on Jan 6, 2019

@zeripath
Contributor

Heya, so this is due to the fix for the security issue that led to 1.6.2. An alternative fix is in my pull request #5621

AkiraNorthstar

AkiraNorthstar commented on Feb 13, 2019

@AkiraNorthstar
Author

With commit #5702 it is again possible to edit and create files with a leading dot via the web interface without being renamed.

A thank you to all who participated!
Best regards,

AkiraNorthstar

locked and limited conversation to collaborators on Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lafriks@zeripath@AkiraNorthstar

        Issue actions

          Error when creating / editing files with a leading dot · Issue #5652 · go-gitea/gitea