[PR #6871] [MERGED] bugfix: firecfg: fix parsing filenames with multiple ".desktop" #6207

Closed
opened 2026-05-05 10:52:45 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/6871
Author: @kmk3
Created: 8/19/2025
Status: Merged
Merged: 8/20/2025
Merged by: @netblue30

Base: masterHead: firecfg-fix-double-desktop


📝 Commits (1)

  • a67db2d bugfix: firecfg: fix parsing filenames with multiple ".desktop"

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/firecfg/desktop_files.c (+2 -2)

📄 Description

When checking if a .desktop file is valid, firecfg currently searches
for the first occurrence of .desktop in the filename and checks that
it is at the end of the string.

This fails if the filename contains multiple occurrences of .desktop,
such as the one for Telegram Desktop, org.telegram.desktop.desktop:

$ sudo firecfg
[...]
   org.telegram.desktop.desktop skipped (not a .desktop file)

Instead, start the .desktop comparison from the last . character in
the filename.

This amends commit a9c851ee4 ("firecfg: use ignorelist also for .desktop
files", 2024-01-08) / PR #6153.

Fixes #6865.

Relates to #5245 #5876.

Reported-by: @tht2005
Reported-by: @rusty-snake


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/6871 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 8/19/2025 **Status:** ✅ Merged **Merged:** 8/20/2025 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `firecfg-fix-double-desktop` --- ### 📝 Commits (1) - [`a67db2d`](https://github.com/netblue30/firejail/commit/a67db2d46725620c53402c80c4e02c1821e7da76) bugfix: firecfg: fix parsing filenames with multiple ".desktop" ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/firecfg/desktop_files.c` (+2 -2) </details> ### 📄 Description When checking if a .desktop file is valid, firecfg currently searches for the first occurrence of `.desktop` in the filename and checks that it is at the end of the string. This fails if the filename contains multiple occurrences of `.desktop`, such as the one for Telegram Desktop, `org.telegram.desktop.desktop`: $ sudo firecfg [...] org.telegram.desktop.desktop skipped (not a .desktop file) Instead, start the `.desktop` comparison from the last `.` character in the filename. This amends commit a9c851ee4 ("firecfg: use ignorelist also for .desktop files", 2024-01-08) / PR #6153. Fixes #6865. Relates to #5245 #5876. Reported-by: @tht2005 Reported-by: @rusty-snake --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:52:45 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#6207
No description provided.