Publ: Development Blog

Publ v0.7.4, Authl v0.6.0

Posted (2 years ago)

Released new versions of Publ and Authl today.

First, the Authl changes:

  • Fixed some test coverage
  • Changed Twitter user URLs to be stable (but less readable)
  • Added profile_url field to user profiles to make up for the Twitter URL thing

And the Publ changes:

  • Fixed image cache stale directory removal
  • Fix ETag output
  • Full-text search now properly excludes future articles
  • Added a filename normalization tool
  • Fixed an Internal Server Error that occurred from a malformed or expired bearer token (AutoAuth et al)
  • Updated to Authl 0.6.0 and made use of the new profile_url field

The Authl change affects the way that Twitter identities show up in the user system; now instead of the user URL being e.g. https://twitter.com/fluffy#993171, the URL will now be https://twitter.com/i/user/993171. This makes the users.cfg file a little more opaque, but it also fixes the issue that if someone changes their Twitter username their connection is lost forever.

In the short term, you can use a comment to keep track of things, e.g.

[friends]
; fluffy
https://twitter.com/i/user/993171

although this isn’t ideal. In the future I may add the ability to add a post-line comment to make tracking things a bit easier, but I need to find a character that both says “this is a comment” and also can’t actually appear in a URL (so ; and # are out). I suppose I could just treat whitespace as a comment start, though. I’ll consider that for the next version of Publ.

Also, you’ll need to mechanically convert your users.cfg file, with e.g.

$ sed 's,twitter.com/.*#\([0-9]*\),twitter.com/i/user/\1,g' users.cfg > users.cfg.new
$ mv users.cfg.new users.cfg

(or you can use -i but that varies in usage between macOS and Linux so I’ve opted to be safe instead).

This change is a bit annoying for Publ, but it was necessary for other use cases of Authl, such as providing login to applications.

Also, keep in mind that users who were logged in via Twitter will still have their old identity URL present, which will likely cause confusion. The easy fix for that is to reset your session secret. How you do that is up to how your application is configured.

Anyway, as always, when you want to add a user to the users.cfg file, you need to copy the link target, rather than the link text.