Subtext 2.1 Released! Contains Security Update

A Subtext user found a security flaw which opens up Subtext to potential XSS attacks via comment. This flaw was introduced in Subtext 2.0 by the feature which converts URLs to anchor tags. If you are still on 1.9.5b or before, you are not affected by this issue. If you upgraded to 2.0, then please update to 2.1 as soon as you can.

Note that you can edit comments in the admin section of your blog to fix comments if someone attempts to abuse your comments.

This release has several other bug fixes and usability improvements as well. I started to replace the use of UpdatePanel in some areas with straight up jQuery, which ends up reducing bandwidth usage.

List of bug fixes and changes:

  • Fixed Medium Trust issue by removing calls to UrlAuthorizationModule.CheckUrlAccessForPrincipal which is not allowed from medium trust.
  • Removed email address from RSS feed by default and added Web.config setting to change this in order to protect against spamming.
  • Upgraded Jayrock assembly to fix the issue with VerificationException being thrown.
  • Fixed code which strips HTML from comments when displaying recent comments. Certain cases would cause CPU spike.
  • Fixed Remember Me functionality for the OpenID login.
  • Fixed a bug with adding categories in which an error was displayed, even though the category was added correctly.
  • Fixed a bug in the code to convert URLs to anchor tags.
  • Upgraded jQuery to version 1.2.6
  • Improved the timezone selection UI with jQuery

I was the one who implemented the feature at fault. Unfortunately the way the feature was written made it such that it reversed earlier scrubbing of the HTML due to a mistake in how I used SgmlReader. I apologize for the mistake. It won’t happen again.

Many thanks go out to Adrian Bateman for pointing out the bug and the fix.

Notes for new installations

The install package includes a default Subtext2.1.mdf file for SQL 2005 Express. If you plan to run your blog off of SQL Server Express, installation is as easy as copying the install files to your Web Root. If you’re not using SQL Express, but plan to use SQL Server 2005, you can attach to the supplied .mdf file and use it as your database.

Notes for upgrading

In the app_data folder of the install package, feel free to delete the database files there. They only apply to new installs. Subtext 2.1 does not have any schema changes, so upgrading should be smooth.

Full upgrade instructions are on the Subtext project website.

Download it here. Note that the file Subtext-2.1.0.5.zip is the one you want to use to upgrade your site. The other file contains the source in case you want to build the solution.

Tags:

What others have said

Requesting Gravatar... Si Philp Nov 28, 2008 12:59 AM
# re: Subtext 2.1 Released! Contains Security Update
This is fantastic news. I was about to do an upgrade from the trunk now I don't need to :)

Requesting Gravatar... Andrei Rinea Nov 28, 2008 1:41 AM
# re: Subtext 2.1 Released! Contains Security Update
When will an MVC version appear? :D
Requesting Gravatar... Dragan Panjkov Nov 29, 2008 12:28 AM
# re: Subtext 2.1 Released! Contains Security Update
Excellent work, Phil! I finally managed to successfully upgrade installation on my blog to 2.1.0.5 from 1.9.3 (all upgrade attempts to other releases were unsuccessfull).
Requesting Gravatar... Braden Nov 29, 2008 3:39 AM
# re: Subtext 2.1 Released! Contains Security Update
Most excellent! :) Thank you, Phil!!
Requesting Gravatar... Aetrex Dec 01, 2008 8:33 AM
# re: Subtext 2.1 Released! Contains Security Update
Phil, this is excellent news. Great!
Requesting Gravatar... Flavio Muniz Dec 03, 2008 6:09 AM
# re: Subtext 2.1 Released! Contains Security Update
Does it have any way I leave the title be on the tagcloud by default?

Requesting Gravatar... Robbie Dec 06, 2008 10:23 PM
# re: Subtext 2.1 Released! Contains Security Update
Finally got around to upgrading my blog from 1.9.5 to 2.1.0.5. Looking forward to future goodness.
Requesting Gravatar... Pierre Henri Kuate Dec 07, 2008 9:29 AM
# re: Subtext 2.1 Released! Contains Security Update
Hi,
I just migrated from v2.0 to v2.1 and I noticed that, in Web.config, you removed the assemblyBinding to redirect System.Web.Extensions to .NET 3.5 which causes the error: "The server tag 'asp:ScriptManager' is ambiguous."
So I had to add it back to make it work again.

Thanks for this great product!
Requesting Gravatar... holywolf Jan 09, 2009 7:03 AM
# re: Subtext 2.1 Released! Contains Security Update
I have updated to subtext 2.1,and when I edit an existing category I got a error message:
Value cannot be null. Parameter name: str,
how can I do?
Requesting Gravatar... Pankaj Mishra Apr 07, 2009 11:53 AM
# re: Subtext 2.1 Released! Contains Security Update
Good work Phill. Now i am thinking of moving to subtext.
Requesting Gravatar... Eric Jul 19, 2010 4:34 AM
# re: Subtext 2.1 Released! Contains Security Update

Hi Phil,

I'm having issues with UrlAuthorizationModule.CheckUrlAccessForPrincipal and medium trust, how did you replace this functionality? Thanks.

What do you have to say?

(will show your gravatar)
Please add 7 and 1 and type the answer here: