dgw / yourls-dont-track-admins

A plugin for YOURLS (the self-hosted URL shortener) that disables tracking clicks on shortened URLs for logged-in users.
https://github.com/dgw/yourls-dont-track-admins
GNU General Public License v3.0
33 stars 7 forks source link

Initialize the plugin only when a redirection occurs #8

Closed ozh closed 2 years ago

ozh commented 2 years ago

The problem with YOURLS/YOURLS#3087 and maybe a few others was that the plugin was checking yourls_is_valid_user() too soon (I guess this happens since I added a nonce to the login? Not sure, didn't dig deeper)

Anyway, I thought it would be simpler to initialize stuff only when a redirection occurs and don't interfere with anything otherwise.

Also, I took the liberty of rewording the plugin description to make it more understandable to the average Joe who doesn't know about yourls_update_clicks()