thilojaeggi / WinGetty

An open source REST Backend for creating a private WinGet Repo without having to rely on cloud dependencies.
https://wingetty.dev
GNU Affero General Public License v3.0
168 stars 15 forks source link

Support common identifiers #50

Open marci4 opened 2 months ago

marci4 commented 2 months ago

Is your feature request related to a problem? Please describe. Most identifiers in the current winget repository contain "special" characters, which will currently be removed when adding a package via the UI (https://github.com/thilojaeggi/WinGetty/blob/main/app/templates/modals/add_package.j2#L63)

Describe the solution you'd like or how it could be implemented Support common identifiers containing ("+","-",".""_")

Additional context Examples: Notepad++.Notepad++ ndd.Notepad-- Zheguisoft.zg_mdm

marci4 commented 2 months ago

I would love to help you here, if you can maybe explain why you changed this with https://github.com/thilojaeggi/WinGetty/commit/8f1cdbf303c1215f8ea1bf3ae926ca4e494e7aea

thilojaeggi commented 2 months ago

Hi marci4

Iirc this was done in an attempt to remove special characters from the Identifier as these would get stripped later by "secure_filename" in the backend. Although I think "+" amongst others should be safe from this and the regex could be changed.

thilojaeggi commented 2 months ago

Fixed in: 9870372faf707d61832ee3feb5ff3385a92c2538 0bb9ccb506a719ed399aa911b3f0261b952439c8 7dcc8f1c884446ad2f399fcfa32cbbf8aacee6ca

marci4 commented 2 months ago

Works after updating to the current dev. Thank you @thilojaeggi for the quick fix.

thilojaeggi commented 2 months ago

Just fyi, it is not recommended to use the dev branch as it will break things.

marci4 commented 2 months ago

Sorry I have to reopen the issue. It is still not possible to upload a package name with an identifier like "Microsoft.DotNet.SDK.8"