gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis

Home Page:https://gchq.github.io/CyberChef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: <Safari issue>

stonewallrust opened this issue · comments

Safari on macOS will not allow for adding to favorites with drag and drop. I can perform it with the Edge browser on macOS.

  • OS: macOS Sonoma 14.3.1
  • Browser: Safari 17.3.1
  • CyberChef version: 10.7.0

Works fine in Brave browser as well.

I put a breakpoint in Safari and it does seem like the drag-over event gets triggered, but something else prevents further action e.g. change the style, receive drop further down the line ...

Screenshot 2024-04-03 at 12 48 49

The check for if ("move" !== e.dataTransfer.effectAllowed) is what prevents it from working (it becomes "copyMove").

Other notes
On Safari on a mac - effectAllowed cannot be set programatically, therefore any dropEffect that gets set is valid. When you press the cmd key the effectAllowed becomes "move" and when you press the alt key the effectAllowed becomes "copy". Thereafter it works as you would hope, if the dropEffect is not one of these effectAlloweds the drop is not allowed by the browser.

(source)

So, at least there is a workaround for Safari-users who need this functionality to work now:
Hold ⌘ Command while draggnig the item to the Favorites tab.

Thank you for the response and tip. Is there also a secret to getting favorites to save in Safari? I had edited them and made them my own, and then the next day they were gone… poof!

No idea - Favorites work perfectly for me now (-after I discovered you just need to drag-drop while holding the Command key).

Do note that the preferences are kept in LocalStorage, which the browser keeps unique to each URL / origin. That comes with the following consequence:

  • if you visit your CyberChef at a new address, your settings will indeed be poof :ed. For example, the Favorites you've saved while working with the official release instance at https://gchq.github.io/CyberChef/ will not show up when you download and open e.g. file://D:/Downloads/CyberChef_v10.18.6/CyberChef_v10.18.6.html.
  • If use Private Browsing or explicitly set Safari to clear website data after X time or stuff like that, the Favorites won't stay around either