мая
12
2009
0

IP spoofing attack?!

Problem:

/!\ FAILSAFE /!\  Tue May 12 15:15:53 +0300 2009
Status: 500 Internal Server Error
IP spoofing attack?!
HTTP_CLIENT_IP="10.1.200.218"
HTTP_X_FORWARDED_FOR="217.117.64.2, 217.117.64.2"

Decision:

( Rails 2.3 )
ActionController::Base.ip_spoofing_check = false
Ruby on Rails 2.3 Release Notes

( Path )
forwarded_client_ip_with_test.patch

( READ )
https://rails.lighthouseapp.com/projects/8994/tickets/322

( READ )
http://github.com/rails/rails/commit/0a4a5f3129a137fc357e8444a08b135f0ad4fbe8

Опубликовал adik в Технотрония | Метки:
мая
11
2009
0
Янв
26
2009
1

Marshal.load = undefined class/module

Иногда в development при cache_classes = false

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Marshal 
  class <<self
    def load_with_preload_class(str, &p)
      str.scan(/.o:.([\w:]+)/).each{|matches|
        begin
          # by constantizing the class name,
          # it should trigger it to be autoloaded.
          matches.first.constantize
        rescue NameError
          # I guess that wasn't a class we found after all.
          # Nothing to see here, move along
        end
      }
      load_without_preload_class(str, &p)
    end
    alias_method_chain :load, :preload_class
  end
end
Опубликовал adik в Технотрония | Метки:

Работает на WordPress | Локализация: goodwin.wpbot.ru