Solved URL Shortcut dragged to desktop is blocked by default
-
@DoctorG Thank you very much for checking!
In the great scheme of things, this a small issue, but I know I am not alone in the habit of dragging shortcuts to the desktop for various things. It has been a part of basic browser functionality since the earliest days and is still useful for short term reminders.
That said, the issue is apparently as small as the carriage return character Vivaldi uses -- or fails to -- when it creates the URL file. If you open a shortcut file created by a different Chromium-based browser in a good text editor, you'll see the URL ends with a carriage return-linefeed character pair (CR/LF). Vivaldi's file ends the first line with just an LF character and adds no terminating CR/LF to the end of the URL. That is what generates the security warning from Windows, as far as I can tell.
I'm just frustrated because it seems like it should be a very small effort to finally FIX this little, nagging, annoying problem if I can only get someone interested in doing it.
-
@Pesala No.
As I explain in the link above it is this warning:
-
@joeduffus You don't need to unblock it. Just click on Open and it opens fine. One extra useless click, but not a deal-breaker.
However, it is surprising that such an old bug has not been fixed yet, when it appears to be a trivial fix.
-
@joeduffus Dev said that it is not the broken line-ending alone, much mire to fix for Windows Security.
-
@joeduffus You may be talking about a different bug to the one reported by the OP.
-
@DoctorG I'm fairly technical, so can you provide more information about what the developer said? If it has to do with associating a .URL file within Windows, I have done that and it doesn't stop Vivaldi (my default browser, of course!) from properly opening a shortcut file that was created by someone else's browser.
-
We should probably continue this discussion on that other thread (which I created!) to avoid clogging this one.
-
@joeduffus
Dev said:It's definitively not as easy as to just add a \n at the end of the url.
-
@joeduffus Then report the first post by 3-dots-button to be split by a mod.
-
@DoctorG Hmm.
Yet, if I manually edit the file on my desktop, replacing the LF line ending on the first line of the file and adding a carriage return linefeed character pair to the end of the url itself and save the file, it opens without a problem in Vivaldi.
-
@joeduffus Yes, i know this and such change helps.
I wanted to communicate what the dev had said. -
I appreciate that. Thank you. As they say, it always seems easy to the man who doesn't have to do it himself.
For myself, I found on here somewhere a little batch file that finds all the .url files in the desktop folder and tics off the security flag and I run that periodically. That, too, fixes the problem. But it still seems like it should be addressed.
-
@joeduffus said in URL Shortcut dragged to desktop is blocked by default:
For myself, I found on here somewhere a little batch file that finds all the .url files in the desktop folder and tics off the security flag and I run that periodically. That, too, fixes the problem.
Would be kind to share the batch file!
Please post the code in </> button here. -
@joeduffus It's true and a bit strange that Vivaldi for some reason saves .url files in Unix format (LF) while other browser saves in Windows format (CR/LF), and Vivaldi should probably change that.
For me both Unix and Windows format .url files open just fine in Vivaldi and no warning. In fact I can't remember to have ever seen that warning dialog since the Win7 days. Or maybe it's some sort of enhanced security policy setting, possibly for corporate environments? What is your OS?
Another strange thing is the Name and Type in the dialog. It says "Unknown File Type" while such a file should be "Internet Shortcut (.url)". Is the file extension actually .url for that file? If there is no extension (ending with
_url
) then at least that would explain the Type message.Mine look like this when saved:
I don't get the warning myself so I can't check if the missing file Type is just some quirk of the dialog or not.
-
@DoctorG This is the batch file:
@echo on for %%a in (*.url) do call :fixit "%%a" goto :eof :fixit set b="%~n1.bak" copy %1 %b% type %b% > %1 del /q %b% >NUL goto :eof
-
@Pathduck I am running Win10 Home edition, patched and updated fully.
Edition Windows 10 Home
Version 21H2
Installed on 8/11/2020
OS build 19044.1741
Experience Windows Feature Experience Pack 120.2212.4180.0
The issue from Vivaldi is that the "Unblock" option on the General tab must be ticked for the shortcut to open without the challenge. The batch file I just posted will, after it is run, remove that security section (beneath "Attributes") completely from the General tab.
Either approach will work -- editing the actual .URL file to add the CR/LF characters to both lines of the file or unblocking the shortcut through the batch file or manually editing the properties. But ther proof of the pudding for me is that these steps only need to be done when the .URL file was created from Vivaldi, and not when done by another Chromium browser running on the same computer.
-
@joeduffus yep cough it's me who did it cough
from here https://forum.vivaldi.net/topic/65993/can-t-open-url-files/7 -
@joeduffus I don't have that "Security" part in the properties for saved .url files at all.
A quick web search indicates this is probably set by Policy, including "NTFS alternate stream" data in files to mark them as "insecure". Not sure if it detects the difference between Unix/Windows format text files as well to mark "insecure".
https://www.thewindowsclub.com/file-came-from-another-computer-and-blocked
https://weblogs.asp.net/dixin/understanding-the-internet-file-blocking-and-unblockingApparently, the cmd file you have does a
type
of the file which strips out the alternate data stream.A question because I'm curious:
- If you open the converted file in a good text editor does it show with CRLF line endings or is it still just LF?
Anyway, this does not change the fact that Vivaldi should save .url files like other browsers and save in the correct format for .url files (CRLF).
-
@Pathduck said in URL Shortcut dragged to desktop is blocked by default:
If you open the converted file in a good text editor does it show with CRLF line endings or is it still just LF?
It shows with a LF character at the end of the first line and nothing after the end of the URL on the second line. I use Notepad++ for things like this, and it has a conversion option to do that automatically, but I have that feature disabled.
-
@iAN-CooG Well thank you for that!
Works great.