From b3aa285476094af9bb8be10957269da0558222b1 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 3 Jun 2011 11:37:29 -0500 Subject: [PATCH] Don't need forbidden check anymore --- lib/linguist/blob_helper.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 550a0a1c..b9255b6c 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -241,25 +241,6 @@ module Linguist end end - # Public: Determine if the blob contains bad content that can be - # used for various cross site attacks. - # - # Right now this is limited to flash files -- the flash plugin - # ignores the response content type and treats any URL as flash - # when the tag is specified correctly regardless of file - # extension. - # - # Requires Blob#data - # - # Returns true when the blob data should not be served with any - # content-type. - def forbidden? - if data = self.data - data.size >= 8 && # all flash has at least 8 bytes - %w(CWS FWS).include?(data[0,3]) # file type sigs - end - end - # Public: Detects the Language of the blob. # # May load Blob#data