YOURLS 1.8.1

YOURLS 1.8.1 is available to the world.

This “patch release” fixes the update procedure for folks running MySQL and having table names with dashes (eg joe-yourls-options … Jeez, gentlemen, underscores ftw!).

It also fixes the way YOURLS determines if a page should be publicly available or not, on private installs, for instance to have private YOURLS instances where one must log to enter the admin area but where the API or stat pages are viewable by anyone.

While I was at it, I added an interesting new hook for actions and filters : the “all” hook, to be able to attach every single action and filter that YOURLS triggers to the same function. Debugging level 9000. See the wiki page Debugging YOURLS to learn how to use this powerful hook.

To update: simply download the new release and overwrite your files. As usual this won’t affect user defined files, such as plugins, config or languages. And as usual, even if this quick update doesn’t change anything in the DB, when was the last time you made a backup? :)

Spread the word, and take care !

Short URL to this post: http://yourls.org/eu

YOURLS 1.8 “Mike Muir” released

It is with great pleasure and excitement that I announce the release of YOURLS 1.8 “Mike Muir”!

Hail Mike Muir 🤘❤️

First things first, in our now secular tradition to name YOURLS releases after a infamous metal vocalist, I’m dedicating this release to Mike Muir, cyco frontman from the sublime thrash punk band we all mosh to, Suicidal Tendencies. Damn I love this man. I suggest you tune in some relaxing music while reading the rest of this post and updating YOURLS.

Mike Muir, photo by my concert pal Ronan Thenadey. Best concert photograph ever, seriously.

So, YOURLS 1.8 ?

Yes, YOURLS 1.8 and a lot of reasons for you to update. Let’s list the major ones :

  • Much, much, very much better support for UTF8 and ᵮưȵƙƴ letters. The long running issue of “page title is weirdly encoded” should be a thing of the past, no matter the charset, the encoding or the alphabet used on the URL you’ll shorten. YOURLS also now fully support being installed on IDN domains out of the box, without the use of a plugin as it did before.
Take that, IDN and stuff
  • PHP compatibility : YOURLS 1.8 is of course compatible with PHP 8. We’re also dropping support for older PHP versions and are now advocating that you use at least 7.4. Although 7.2 is still supported we will probably make less efforts in the future than we did in the past to maintain compatibility with deprecated PHP.
  • Time and timezone management : till now, YOURLS was a happy mess of timezone “sort of” support. Now more! While the core code has been streamlined and simplified to only use UTC, we have also developed a neat timezones plugin to properly manage timezones and how date & time are displayed on your install.
  • Slightly updated UI and logo, all in SVG light and scalable goodness.
  • And of course several bug fixes and improvements under the hood – check the commit log if you are interested.

“Awesome YOURLS” is more awesome now

Awesome YOURLS is the curated list of, well, awesome things about YOURLS : plugins, translations, themes, install guides, tutorials, tools, packages for various platforms, applications and programming languages. It’s a truly amazing resource list.

The list has been improved lately : more content, more readable. More awesomeness. Be sure to check it, star it on Github and have your work featured there!

Update and tell friends to update !

As always, we advise you to update as soon as you can. And as always, we advise you to backup your DB before doing so, because, you know why.

And, as always, we’re counting on you : spread the word about this new release, share the news on Twitter, on your Facebook wall, on wherever you virtually exist and let your friends know about this.

Short URL to this post: http://yourls.org/es

YOURLS 1.7.9

YOURLS update : the latest release is now 1.7.9 and you will find it, as usual and only, on YOURLS release page on Github.

This release could have been nicknamed “the Quarantine Edition” since, because or thanks to the corona-lockdown (day 35 and counting) I’ve had quite some time to fix things and improve stuff, as you’ll see on the release page.

Truth be told, I’m also pushing this release as a security update. Last night, the DJ didn’t save my life, but the server hosting https://api.yourls.org was compromised. As a result, you may have seen a message in your YOURLS admin interface advertising a 1.7.8 release with an unusual download link. This was quickly noticed and fixed but a couple hundreds people still downloaded the fake archive, so I’m pushing a newer one for everyone.

Update as usual : download files and overwrite all existing files on your server (your personal files such as plugins or config will remain untouched).

Do the community a favor: stay safe, wash your hands, tweet this post and let friends know about this update!

Short URL to this post: http://yourls.org/eg

🖕 Twitter 😞

This is just a short announcement to highlight the fact that YOURLS online presence has been removed from Twitter. As a matter of fact, for completely unknown reasons, Twitter has suspended our @yourls and @yourls_dev accounts (allegedly: breaking the terms of use, but despite my claims and requests I have no details and they just won’t listen).

So, in you are on Twitter and find anything you read about YOURLS useful, be sure to share it. YOURLS “official” Twitter account being removed just means that, from now on, YOURLS Twitter accounts are its users’. Share the love and help your friends!

Stay safe. Virtual and social-distanced hugs from the YOURLS team.

Short URL to this post: http://yourls.org/ee

YOURLS 1.7.6

Hello 2020! We’re pushing a new release for YOURLS, tagged 1.7.6, with a couple small improvements. You can find boring details in the changelog and on the YOURLS release page on Github.

Updating is the same painless procedure as usual : download and overwrite existing files. But hey, since it’s a new year and everything, why not make a backup of your database somewhere? ;-)

Short URL to this post: http://yourls.org/eb

YOURLS 1.7.4

We’ve just released a security patch for YOURLS, so everyone is advised to update when possible.

What’s new? We’ve hardened security. All prior versions of YOURLS, up to 1.7.3, can be abused in a way that allows a script kiddy malicious user to use your API by forging a valid timestamp, and add unwanted links to your shortener.

How to update? Same and as painless as usual: download the archive and overwrite all existing files. While you’re at it, backup your database, and tell your friends and family to update too!

Short URL to this post: http://yourls.org/ea

YOURLS 1.7.3

Hello world, and happy new year everyone!

This year 2019 starts with a maintenance release of YOURLS, bumping its version to YOURLS 1.7.3.

What’s new? Mostly lil bug fixes and small enhancements here and there, nothing breath taking, but we thought it might be a good idea to push a release that would reflect changes committed this past months, mostly for folks who install “stable” releases, either manually or using third party tools.

How to update? Same as usual, download the archive and overwrite all existing files. While you’re at it, backup your database because this is one of your new year resolutions, and tell your friends and family to update too!

Love and short links to all !


Short URL to this post: http://yourls.org/e0

YOURLS 1.7.2

Hello World! I’ve had some free time recently to devote to your favorite URL shortener, and as a result the latest is now YOURLS 1.7.2. Update now and be sure your friends update too!

What’s new? This is a bugfix lil’ release and you will probably won’t notice much if you don’t inspect under the hood. For those interested of course the CHANGELOG keeps track of everything that has been improved, added or fixed.

The only real “major” news is that PHP 5.2 support is officially dropped. To be honest it’s been unofficially supported for quite some time now, and if you still happen to run PHP 5.2 and YOURLS works on it, cool for you, but it should be definitely broken on your side from now on. For the record, as of today less than 2.9% of all YOURLS installs still run on 5.2, while 22% are on 5.3, 28% on 5.4, 20% on 5.5, 20% on 5.6 — as you can see this is pretty even — and just above 5% of you folks running PHP 7+. Yes, in case you were unaware, YOURLS is running fine on PHP 7+.

How to update? Same business as usual. Simply download the archive and overwrite all existing files. While you’re at it, why don’t you backup your database data? I’m sure it’s been a while already since last time :)

Update and tell your friends and family to update too!

Short URL to this post: http://yourls.org/du

YOURLS 1.7.1

Hello world! Your favorite URL shortener just got some love and the latest is now YOURLS 1.7.1. Update and let your friends know!

What’s new? Lots of bug fixes, lots of improvements, nothing that will rock your socks in awe, but several things you won’t notice because they just work better :) See the changelog for more details.

How to update? If updating through the command line is too hardcore for you, just download the archive and overwrite your existing install. This update doesn’t contain anything scary, but of course that’s no reason not to have a proper backup of your data from time to time, right? :)

What’s next? We’ll continue our slow trip down the road map but the most noticeable change for a few of you will be that we are going to start breaking things!

  • we’re dropping PHP 5.2 support. As of today 3.8% of all YOURLS installs run this super deprecated PHP version: folks, please.
  • We’ll probably drop MySQL support as well. An overhaul of the DB stuff has been planned for long, MySQL is deprecated in newer PHP builds, so we’ll very most likely switch to PDO. Sorry for the 1.9% of you that don’t have PDO installed on their server, but that is not something that’s acceptable from a decent web host :)

Update and tell your friends and family to update too!

Short URL to this post: http://yourls.org/dl

Integrating the New Google reCAPTCHA With YOURLS

This guide and screenshots are courtesy of Jared Stark and Erasure Web Services, originally available on their own bitty.link shortener. It’s duplicated here in case their goes offline or missing but please check on the original link first in case they have updated it. Much thanks to them!

How to integrate the New Google reCAPTCHA With YOURLS

The problem

URL shortening services are often a target for automated spam form submissions. The traditional way to prevent spam bots from doing this is to require a captcha to be properly filled out before a form can be submitted. Unfortunately, captchas can significantly reduce the quality of a user experience as they require deciphering cryptic text, putting the pieces of a puzzle together, or some other action which can significantly increase the amount of time a user spends trying to complete a form.

The new Google reCAPTCHA service aims to get rid of those traditional problems with captchas by providing what they call the “No CAPTCHA reCAPTCHA experience.” This is accomplished by using an “advanced risk analysis system” which can separate actual humans from bots with just the check of a box. More information about this system can be found on the Google reCAPTCHA website.

Because of its easy of use, the new Google reCAPTCHA is ideal for URL Shortening websites since it allows users to create short URLS quickly while preventing spam at the same time. This tutorial will show you how to integrate this service into a YOURLS installation, much like what this website, bitty.link uses.

The solution : tutorial

This tutorial will show how to implement the “No CAPTCHA reCAPTCHA” into the default YOURLS public interface setup. Obviously, it can be tweaked and modified for other public interfaces.

Please note that this tutorial uses the reCAPTCHA API 1.0.

  1. Visit the Google reCAPTCHA website. You will need to “Get reCAPTCHA,” which requires a Google account. After filling out the required information, you should receive your site key and secret key. Make sure to keep this information handy.
  2. In your YOURLS installation, open the file includes/functions-html.php. Copy the JavaScript client-side script from the reCAPTCHA website and place it in the described place (screenshot)
  3. Open your public interface file. On the reCAPTCHA website, copy the “sitekey” line and paste it in the described place (screenshot)
  4. Upload a copy of the captcha.php and recaptchalib.php files to the directory of your YOURLS installation that has your public user interface in it. Although those two files do not use the most recent reCAPTCHA API, they are easier to implement and will still work just fine.
  5. In the captcha.php file, paste in your secret and site keys to the indicated spots.
  6. Open your public user interface file. Paste the following under where it says “Part to be executed if FORM has been submitted:” include('captcha.php'); if ($resp != null && $resp->success) { (screenshot)
  7. Place a } at the end of the text block in the example photo: (screenshot)

This is the most basic way to get the new Google reCAPTCHA working on your YOURLS instillation. Although it will prevent spam bots from submitting automated requests, if a user fails to fill out the captcha, unfortunately, a reason to why the request failed will not be given unless more code is added.

Tutorial written by Jared Stark for bitty.link

Short URL to this post: http://yourls.org/di