rails icon

Rails 1.1.5 routing vulnerability

Posted in , Thu, 10 Aug 2006 15:37:00 GMT

People are reporting a Rails 1.1.5 routing vulerability where accessing certain URIs will crash Rails. The problem has been reported on Mongrel, WeBrick and FastCGI. Piers Cawley is working on an explicit routes fix for Typo and discusses the issue on his blog. This has not been mentioned on the RoR blog yet. Good thing for public forums.

Read more...
del.icio.us:Rails 1.1.5 routing vulnerability digg:Rails 1.1.5 routing vulnerability reddit:Rails 1.1.5 routing vulnerability spurl:Rails 1.1.5 routing vulnerability wists:Rails 1.1.5 routing vulnerability simpy:Rails 1.1.5 routing vulnerability newsvine:Rails 1.1.5 routing vulnerability blinklist:Rails 1.1.5 routing vulnerability furl:Rails 1.1.5 routing vulnerability fark:Rails 1.1.5 routing vulnerability blogmarks:Rails 1.1.5 routing vulnerability Y!:Rails 1.1.5 routing vulnerability smarking:Rails 1.1.5 routing vulnerability magnolia:Rails 1.1.5 routing vulnerability segnalo:Rails 1.1.5 routing vulnerability

no comments

typo iconrails icon

Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6

Posted in , , Thu, 10 Aug 2006 06:14:00 GMT

It was recently announced that Rails 1.1.0, 1.1.1, 1.1.2, and 1.1.4. have a very serious security hole. Although the RoR blog hasn't discussed exactly what the hole is, it has been rumored to involve uploading of .rb files to execute arbitrary code on the server (UPDATE: now confirmed). Typo only allows file uploads by administrators so certain applications may be somewhat safer. (UPDATE: Running arbitrary code was fixed in 1.1.5 however you could still crash it. 1.1.6 has been released to fix these lingering bugs. Just change 1.1.5 to 1.1.6 below).

Read more...
del.icio.us:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 digg:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 reddit:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 spurl:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 wists:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 simpy:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 newsvine:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 blinklist:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 furl:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 fark:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 blogmarks:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 Y!:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 smarking:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 magnolia:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6 segnalo:Upgrading Typo 4.0.0 to Rails 1.1.5/1.1.6

no comments

firefox icon

Firefox, Atom 1.0 and namespacing

Posted in Wed, 09 Aug 2006 10:16:00 GMT

It seems that Firefox's basic xml parser gets confused by xmlns and namespacing. Namely that if the feed is defined by:

<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:default="http://www.w3.org/1999/xhtml"
xmlns:dc="http://purl.org/dc/elements/1.1/">

Firefox's basic XML tree renderer won't recognize the XML if the entry content is wrapped by:

    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>Show submenus depending on where your users are.</p>
      </div>
    </content>

Basically it confuses xhtml:div with atom:div. If xmlns is removed from the div, Firefox is fine.

People don't generally use Firefox's XML tree to read Atom and the W3C Feed Validator doesn't have a problem with it so I'm wondering if this bug exists anywhere else.

This shows up when using XML::Atom because it uses XML::LibXML, which explicitly adds xmlns everywhere.

UPDATE 1: I thought it would be useful to include the following:

The Atom spec (section 4.1.3.3 Processing Model) says:

If the value of "type" is "xhtml", the content of atom:content MUST be a single XHTML div element [XHTML] and SHOULD be suitable for handling as XHTML. The XHTML div element itself MUST NOT be considered part of the content.

UPDATE 2: Apparently this behavior may be by design. Not very useful IMO but perhaps intentional. I think it would be more useful to have some Firefox settings that let you switch to XML tree mode or apply a default stylesheet.

del.icio.us:Firefox, Atom 1.0 and namespacing digg:Firefox, Atom 1.0 and namespacing reddit:Firefox, Atom 1.0 and namespacing spurl:Firefox, Atom 1.0 and namespacing wists:Firefox, Atom 1.0 and namespacing simpy:Firefox, Atom 1.0 and namespacing newsvine:Firefox, Atom 1.0 and namespacing blinklist:Firefox, Atom 1.0 and namespacing furl:Firefox, Atom 1.0 and namespacing fark:Firefox, Atom 1.0 and namespacing blogmarks:Firefox, Atom 1.0 and namespacing Y!:Firefox, Atom 1.0 and namespacing smarking:Firefox, Atom 1.0 and namespacing magnolia:Firefox, Atom 1.0 and namespacing segnalo:Firefox, Atom 1.0 and namespacing

7 comments

catalyst iconplagger icon

Planet Catalyst

Posted in , Thu, 03 Aug 2006 15:28:00 GMT

I just set up Planet Catalyst at http://planet.catalystframework.org to aggregate blogs about the Catalyst MVC framework. It is also linked from the main Catalyst homepage and Planet Perl so you can reach it from there. The planet is focused on articles related to Catalyst and friends which means it filters articles on catalyst, dbic, dbix(::|-)?class or html(::|-)?widget, h::w or handel (case insensitive). Let me know if there are any other topics of interest that should be included.

Planet Catalyst is powered by Plagger, a Perl-based RSS/Atom feed aggregator. Thanks to Tatsuhiko Miyagawa for writing Plagger and answering my questions on the #plagger FreeNode IRC channel. It was very easy to add filtering on keywords by specifying a rule in the config file.

If you have questions or would like a blog added, send email to the catalyst-dev mailing list, comment on this article or ask on #catalyst / #catalyst-dev perl.org IRC channels.

del.icio.us:Planet Catalyst digg:Planet Catalyst reddit:Planet Catalyst spurl:Planet Catalyst wists:Planet Catalyst simpy:Planet Catalyst newsvine:Planet Catalyst blinklist:Planet Catalyst furl:Planet Catalyst fark:Planet Catalyst blogmarks:Planet Catalyst Y!:Planet Catalyst smarking:Planet Catalyst magnolia:Planet Catalyst segnalo:Planet Catalyst

no comments

typo icon

Typo Upgrade: 2.6.0 to 4.0.0 r1188

Posted in Wed, 02 Aug 2006 23:32:00 GMT

I finally got around to upgrading Typo here to the latest trunk. At first I was waiting to upgrade to 4.0.0 (officially r1161) but decided to move to SVN after hearing about some post-r1161 bugfixes and it seems like a fairly common practice to run off SVN, at least for Typo. I've hacked a few changes onto 2.6.0 and had to manually merge the mods to r1181. Merging one's own mods to the trunk was discussed today on the Typo mailing list under the heading "Version Controling Modifications" and most of the respondents have their own mods and use Chia-Liang Kao's SVK to keep their mods synced with the trunk. Scott Laird has a number of articles on using SVK with Typo's repo. Seems like running off of the trunk with SVK may be a best practice for Typo installations.

Hopefully I'll be on SVK for my next upgrade since I had to manually update the following files this time around:

  • app/controllers/articles_controller.rb
  • app/helpers/application_helper.rb
  • app/helpers/articles_helper.rb
  • app/views/articles/_article.rhtml
  • app/views/articles/_articles_toc.rhtml
  • app/views/articles/index.rhtml
  • app/views/articles/read.rhtml
  • components/plugins/sidebars/category/content.rhtml
  • components/plugins/sidebars/xml/content.rhtml
  • config/routes.rb
  • themes/azure/layouts/default.rhtml

I've moved all my Azure theme changes to a custom theme so the changes are easier to keep track of and don't interfere with the base Azure theme.

I've updated my Installing Typo article to cover SVN checkout, Feedburner customization and rake migrate. The Typo TOC How-to has also been updated for 4.0.0.

While code diving, I was happy to see lots of refactoring though the code is still pretty easy to follow and modify. Hopefully soon I'll be back to hacking more enhancements. I'm particularly interested in extending the sidebar functionality so groups of plugins can be positioned in multiple locations on the page, e.g. a 3-col layout.

Upgrade Gotchas

  • UPDATE: this section on Feed URIs seems to be inaccurate because I chose to use my old 2.6.0 routes.rb file. I didn't think the feed URIs would change. New approach: don't assume anything has stayed the same and move to svk.
    Feed URIs: Typo 4.0.0 changes the feed URIs from 2.6.0 so if you have these URIs registered somewhere, e.g. Feedburner or LiveJournal, you'll need to upgrade your URIs. The new URI styles are:
    • http://www.dev411.com/blog/xml/feed/feed.xml?type=feed&format=atom
    • http://www.dev411.com/blog/xml/feed/feed.xml?type=feed&format=rss20
    For comparison, the 2.6.0 style is:
    • http://www.dev411.com/blog/xml/rss/feed.xml
    Everytime this URI changes I need to file a support ticket at LiveJournal whereas on Feedburner I can change the URI myself. I've been wondering if I should just have LiveJournal use the Feedburner URI ;)
  • Categories sidebar no longer alphabetized: My categories list was no longer alphabetized so I edited the components/plugins/sidebars/category/content.rhtml page from:
    <% for category in @categories -%>
    to
    <% for category in @categories.sort {|a,b| a.name <=> b.name} -%>
  • config no longer used in ArticlesController: If you used config, the code needs to be changed like this example:
    config[:blog_name]
    to
    this_blog.blog_name
del.icio.us:Typo Upgrade: 2.6.0 to 4.0.0 r1188 digg:Typo Upgrade: 2.6.0 to 4.0.0 r1188 reddit:Typo Upgrade: 2.6.0 to 4.0.0 r1188 spurl:Typo Upgrade: 2.6.0 to 4.0.0 r1188 wists:Typo Upgrade: 2.6.0 to 4.0.0 r1188 simpy:Typo Upgrade: 2.6.0 to 4.0.0 r1188 newsvine:Typo Upgrade: 2.6.0 to 4.0.0 r1188 blinklist:Typo Upgrade: 2.6.0 to 4.0.0 r1188 furl:Typo Upgrade: 2.6.0 to 4.0.0 r1188 fark:Typo Upgrade: 2.6.0 to 4.0.0 r1188 blogmarks:Typo Upgrade: 2.6.0 to 4.0.0 r1188 Y!:Typo Upgrade: 2.6.0 to 4.0.0 r1188 smarking:Typo Upgrade: 2.6.0 to 4.0.0 r1188 magnolia:Typo Upgrade: 2.6.0 to 4.0.0 r1188 segnalo:Typo Upgrade: 2.6.0 to 4.0.0 r1188

2 comments

dreamhost icon

Dreamhost and DNS hosting

Posted in Tue, 01 Aug 2006 08:56:00 GMT

If you are hosting at Dreamhost, you are better off letting Dreamhost host the DNS for your domain as well. This is because Dreamhost can change the IP of your server without notifying you. They will update their own DNS servers when this happens but this won't help if you if your DNS is being hosted elsewhere. Use their nameservers and you should be all set.

Sometimes when the DNS is pointing to the incorrect IP, you'll see the following error:

Site Temporarily Unavailable

We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.

error id: "bad_httpd_conf"

del.icio.us:Dreamhost and DNS hosting digg:Dreamhost and DNS hosting reddit:Dreamhost and DNS hosting spurl:Dreamhost and DNS hosting wists:Dreamhost and DNS hosting simpy:Dreamhost and DNS hosting newsvine:Dreamhost and DNS hosting blinklist:Dreamhost and DNS hosting furl:Dreamhost and DNS hosting fark:Dreamhost and DNS hosting blogmarks:Dreamhost and DNS hosting Y!:Dreamhost and DNS hosting smarking:Dreamhost and DNS hosting magnolia:Dreamhost and DNS hosting segnalo:Dreamhost and DNS hosting

1 comment

planet iconplagger icondreamhost icon

Planet Engines: Plagger and Planet

Posted in , , Mon, 31 Jul 2006 04:16:00 GMT

Planet engines are applications that aggregate RSS/Atom feeds and generate composite feeds as well as a website. The generated feeds typically include RSS, Atom, FOAF and OPML. Two popular open source planet engines are Planet and Plagger. I've used both to create planet-style websites and here are my observations:

Read more...
del.icio.us:Planet Engines: Plagger and Planet digg:Planet Engines: Plagger and Planet reddit:Planet Engines: Plagger and Planet spurl:Planet Engines: Plagger and Planet wists:Planet Engines: Plagger and Planet simpy:Planet Engines: Plagger and Planet newsvine:Planet Engines: Plagger and Planet blinklist:Planet Engines: Plagger and Planet furl:Planet Engines: Plagger and Planet fark:Planet Engines: Plagger and Planet blogmarks:Planet Engines: Plagger and Planet Y!:Planet Engines: Plagger and Planet smarking:Planet Engines: Plagger and Planet magnolia:Planet Engines: Plagger and Planet segnalo:Planet Engines: Plagger and Planet

2 comments

dojo iconprototype iconscriptaculous icon

Online Dojo JavaScript Compressor

Posted in , , , Fri, 28 Jul 2006 17:14:00 GMT

I just put together an online JavaScript Compressor interface to Dojo Toolkit's JavaScript Compressor, custom_rhino.jar. The JavaScript Compressor is used in the final stage of the Dojo Toolkit build process so gets a lot of use. Although there is already an online version, ShrinkSafe, I put another version together because:

  • It would be nice to have a web app that makes custom Dojo builds people don't have to install the JDK and ant to get a custom Dojo build. This is the primary reason and the compressor is a first step in that direction.
  • There have been some reports that the JS produced by ShrinkSafe doesn't work (maybe it's using an outdated custom_rhino.jar?). I want an Dojo-based online system to use myself.
  • It's nice to have more Dojo, Prototype and Scriptaculous integration tests. I used the client code from ShrinkSafe which uses Dojo to add additional file and do Drag-and-Drop along with the Lucid theme which relies on Prototype and Scriptaculous. I learned that dojo.js 0.3.1 needs to be loaded before scriptaculous.js 1.6.1 or Scriptaculous will break Dojo (I updated the Dojo and Prototype Together article). My minimal use of the Lucid theme actually doesn't need scriptaculous.js so I can get away with loading just dojo.js 0.3.1, prototype.js 1.5.0 rc0, effects.js (part of Scriptaculous 1.6.1) and lucid.js. lucid.js is part of the Lucid theme.

The JavaScript compressor eats its own dogfood and uses prototype.js, effects.js and lucid.js compressed into a single-line, single file. Here are the compression sizes and ratios for the files. Generally you save about 30%.

script uncompressed compressed
multiline
ratio compressed
single line
ratio
prototype.js 55,149 38,696 70% 37,154 67%
effects.js 32,908 23,244 71% 22,527 68%
lucid.js 7,253 4,917 68% 4,741 65%
All files 95,310 67,570 71% 65,137 68%

A number of people are using JavaScriptCompressor.com which is running Dean Edwards' .NET JavaScript compression code. This can be used after Dojo's compressor for even more compression.

del.icio.us:Online Dojo JavaScript Compressor digg:Online Dojo JavaScript Compressor reddit:Online Dojo JavaScript Compressor spurl:Online Dojo JavaScript Compressor wists:Online Dojo JavaScript Compressor simpy:Online Dojo JavaScript Compressor newsvine:Online Dojo JavaScript Compressor blinklist:Online Dojo JavaScript Compressor furl:Online Dojo JavaScript Compressor fark:Online Dojo JavaScript Compressor blogmarks:Online Dojo JavaScript Compressor Y!:Online Dojo JavaScript Compressor smarking:Online Dojo JavaScript Compressor magnolia:Online Dojo JavaScript Compressor segnalo:Online Dojo JavaScript Compressor

4 comments

catalyst iconjson iconie icon

Catalyst - Customizing the view to stop IE from caching JSON

Posted in , , , Tue, 25 Jul 2006 15:49:00 GMT

Often times you'll want to customize your response specific to the View being used, e.g. setting extra headers. This can be done directly in your View class by creating a process method. All View base classes have a process method defined in Catalyst::View that gets called at rendering time. By adding a process method in your subclass and redispatching to the parent you can do some preliminary processing.

Read more...
del.icio.us:Catalyst - Customizing the view to stop IE from caching JSON digg:Catalyst - Customizing the view to stop IE from caching JSON reddit:Catalyst - Customizing the view to stop IE from caching JSON spurl:Catalyst - Customizing the view to stop IE from caching JSON wists:Catalyst - Customizing the view to stop IE from caching JSON simpy:Catalyst - Customizing the view to stop IE from caching JSON newsvine:Catalyst - Customizing the view to stop IE from caching JSON blinklist:Catalyst - Customizing the view to stop IE from caching JSON furl:Catalyst - Customizing the view to stop IE from caching JSON fark:Catalyst - Customizing the view to stop IE from caching JSON blogmarks:Catalyst - Customizing the view to stop IE from caching JSON Y!:Catalyst - Customizing the view to stop IE from caching JSON smarking:Catalyst - Customizing the view to stop IE from caching JSON magnolia:Catalyst - Customizing the view to stop IE from caching JSON segnalo:Catalyst - Customizing the view to stop IE from caching JSON

no comments

yui icon

Yahoo! UI (YUI) cheat sheets as wallpaper

Posted in , Tue, 25 Jul 2006 08:12:00 GMT

Yahoo! provides a number of cheat sheets for their YUI library widgets however these are in PDF format and not usable as wallpaper. PDF is great as a transport format because you can provide one version for everyone, however transforming it makes it more appealing for actual use. I prefer cheat sheets in standard image formats that can used as wallpaper, espcially useful with virtual desktops.

Yahoo UI! Cheat Sheets

Here are the YUI 0.11 cheat sheets converted to PNG images of various sizes. Let me know if any other sizes would be useful.

del.icio.us:Yahoo! UI (YUI) cheat sheets as wallpaper digg:Yahoo! UI (YUI) cheat sheets as wallpaper reddit:Yahoo! UI (YUI) cheat sheets as wallpaper spurl:Yahoo! UI (YUI) cheat sheets as wallpaper wists:Yahoo! UI (YUI) cheat sheets as wallpaper simpy:Yahoo! UI (YUI) cheat sheets as wallpaper newsvine:Yahoo! UI (YUI) cheat sheets as wallpaper blinklist:Yahoo! UI (YUI) cheat sheets as wallpaper furl:Yahoo! UI (YUI) cheat sheets as wallpaper fark:Yahoo! UI (YUI) cheat sheets as wallpaper blogmarks:Yahoo! UI (YUI) cheat sheets as wallpaper Y!:Yahoo! UI (YUI) cheat sheets as wallpaper smarking:Yahoo! UI (YUI) cheat sheets as wallpaper magnolia:Yahoo! UI (YUI) cheat sheets as wallpaper segnalo:Yahoo! UI (YUI) cheat sheets as wallpaper

2 comments

Older posts: 1 2 3 4 5 6 ... 9