Project

General

Profile

Actions

Defect #2360

closed

Missing checks for nils in the WikiController

Added by Eric Davis over 17 years ago. Updated over 17 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Wiki
Target version:
Resolution:
Fixed
Affected version:

Description

I had a public page on my wiki which I moved to a private project. Web spiders have cached the url and are trying to hit the pages. Instead of getting 404 errors though, they are throwing NoMethodErrors on a nil object. It looks like several actions in the WikiController are not checking for nil object before calling methods on them

  • undefined method `diff' for nil:NilClass [RAILS_ROOT]/app/controllers/wiki_controller.rb:129:in `diff'
  • undefined method `annotate' for nil:NilClass [RAILS_ROOT]/app/controllers/wiki_controller.rb:135:in `annotate'
  • undefined method `content' for nil:NilClass [RAILS_ROOT]/app/controllers/wiki_controller.rb:115:in `history'
Actions

Also available in: Atom PDF