Kovah / LinkAce

LinkAce is a self-hosted archive to collect links of your favorite websites.
https://www.linkace.org
GNU General Public License v3.0
2.49k stars 160 forks source link

Can't save Wayback Machine links via bookmarklet #717

Open respencer opened 8 months ago

respencer commented 8 months ago

Bug Description

When trying to save a webpage in the Wayback Machine using the bookmarklet you get directed to the non-existent archived link of your own bookmarklet/add link.

How to reproduce

  1. Go to: https://web.archive.org/web/20230319211922/https://12factor.net/dependencies
  2. Click on your LinkAce bookmarklet.
  3. You'll now be directed to: https://web.archive.org/web/20230319211922/https://example.com/bookmarklet/add?u=https%3A%2F%2Fweb.archive.org%2Fweb%2F20230319211922%2Fhttps%3A%2F%2F12factor.net%2Fdependencies&t=The%20Twelve-Factor%20App&d=

Expected behavior

My own site link was used: https://example.com/bookmarklet/add?u=https%3A%2F%2Fweb.archive.org%2Fweb%2F20230319211922%2Fhttps%3A%2F%2F12factor.net%2Fdependencies&t=The%20Twelve-Factor%20App&d=

Logs

No response

Screenshots

No response

LinkAce version

v1.12.2

Setup Method

PHP

Operating System

Linux (Ubuntu, CentOS,...)

Client details

Kovah commented 8 months ago

That's a really odd behaviour. I guess that the Wayback Machine messes with the standard window.open() function and alters how it works. Will have a deeper look later on.

Kovah commented 8 months ago

I can confirm that the Internet Archive messes with the window.open() function which is definitely not supposed to happen. It's a standard JS function and overriding it with something else is bad practise. At the moment there is no way around saving the URL directly in LinkAce.