Files icon indicating copy to clipboard operation
Files copied to clipboard

Bug: Some executables will run even if the file extension is not .exe

Open Binekrasik opened this issue 2 years ago • 13 comments

Description

You can rename an .exe to .zip and when you double-click it, it runs the executable. Windows file explorer doesn't do this.

Steps To Reproduce

  1. Get some executable
  2. Change its ending to .zip
  3. Double-click the "zip file"
  4. The executable runs

Requirements

It should display an error that the archive cannot be opened, like windows file explorer.

Files Version

2.5.31.0

Windows Version

10.0.22635.2776

Log File

debug.log

Binekrasik avatar Dec 02 '23 09:12 Binekrasik

Thanks for the report, please update to 3.0.8 and try reproduce this. https://files.community/download

Josh65-2201 avatar Dec 02 '23 09:12 Josh65-2201

Yes, the issue still persists in the new version of Files ( 3.0.14.0 ).

Binekrasik avatar Dec 02 '23 09:12 Binekrasik

I'm unable to reproduce this. I have tried .exe.zip and just .zip both showing the error message and not opening the exe. What the full file name of the one causing this?

Josh65-2201 avatar Dec 02 '23 10:12 Josh65-2201

The full name is windowkill-vulkan.zip (tried this on a portable godot game), but it seems it cannot be reproduced on other executables. It also works with other endings, like .rar and .7z.

Binekrasik avatar Dec 02 '23 10:12 Binekrasik

I don't think so. Someone can, for example, send you a virus that pretends to be a zip file.

Binekrasik avatar Dec 03 '23 19:12 Binekrasik

I see your point, but that aside, I can't repro this issue. Do you have archive files set to open in Files?

yaira2 avatar Dec 03 '23 19:12 yaira2

No, I don't, but tried it and didn't see any difference. However, I've tried to open the 'zip' with Files in file explorer, and that threw an error saying 'NotAFolder', whereas if you try it in Files, it will run the executable without any error.

Binekrasik avatar Dec 03 '23 19:12 Binekrasik

Did you set it to always open in Files?

yaira2 avatar Dec 03 '23 19:12 yaira2

Yes, it says that Files is the default.

Binekrasik avatar Dec 03 '23 19:12 Binekrasik

Hi, I have been able to reproduce the issue.

For certain exe files it works. You change the file extension from .exe to .zip and it still opens when you double click.

My version: 3.0.8.0 on Windows 11 Home 23H2 build 22631.2715

I only tested it for the same exe as @Binekrasik, the main executable of this game - You can download it for free in case you want to test the bug (the money is just optional donation)

Here is a video:

https://github.com/files-community/Files/assets/73077301/95fea9c3-b8d1-4f71-a314-f0d5ebd81142

MartinGamesCZ avatar Dec 03 '23 20:12 MartinGamesCZ

I believe you but I must be missing a step when trying to repro this, can you upload a screen recording (you can use the attach file feature in GitHub) so I can make sure I'm following the same steps?

Sorry for the delay, but I wasn't able to upload the video to Github because of the file size limit. I've uploaded it to streamable instead: https://streamable.com/6peo0v

Binekrasik avatar Dec 03 '23 20:12 Binekrasik

@MartinGamesCZ can you see what happens if you remove the dash?

yaira2 avatar Dec 03 '23 20:12 yaira2

When I remove the dash, the bug still persists (it executes the exe renamed to .zip)

MartinGamesCZ avatar Dec 03 '23 21:12 MartinGamesCZ