view · edit · sidebar · attach · print · history

20130517-debug-authentication-from-result-limit

<< | Index | >>


Summary

Commits

Index


Debug Authentication from result-limit

Yus Authentication is not Problem.
Maybe redirection is the matter.

# login from "Anmeldung"
[1] 1.9.3-p194(#<ODDB::State::Admin::Login>)> user
=> #<ODDB::YusUser:0x0000000a0f9920
 @yus_session=
  #<DRb::DRbObject:0x0000000a0f9f38
   @ref=69817994110620,
   @uri="drbssl://localhost:9997">>
[2] 1.9.3-p194(#<ODDB::State::Admin::Login>)> 
[1] 1.9.3-p194(#<ODDB::State::Admin::Login>)> location
=> "/"
[2] 1.9.3-p194(#<ODDB::State::Admin::Login>)> 


# login from "Result limit"
[1] 1.9.3-p194(#<ODDB::State::Drugs::ResultLimit>)> user
=> #<ODDB::YusUser:0x00000008a9e540
 @yus_session=
  #<DRb::DRbObject:0x00000008a9e608
   @ref=69817993745280,
   @uri="drbssl://localhost:9997">>
[2] 1.9.3-p194(#<ODDB::State::Drugs::ResultLimit>)> 
[1] 1.9.3-p194(#<ODDB::State::Drugs::ResultLimit>)> location
=> "/de/gcc?search_query=aspirin&search_type=st_oddb&flavor=gcc&language=de&event=search&state_id=82598140#best_result"

ODDB::Session check static contstant (LIMITED) via @state.limited?

    def limit_queries
      requests = (@@requests[remote_ip] ||= []) 
      if(@state.limited?)
        requests.delete_if { |other| 
          (@process_start - other) >= QUERY_LIMIT_AGE 
        }
        requests.push(@process_start)
        if(requests.size > QUERY_LIMIT)
          @desired_state = @state
          @active_state = @state = @state.limit_state
          @state.request_path = @desired_state.request_path
        end
      end 
    end

oddbapp#login

    def login(email, pass)
      YusUser.new(YUS_SERVER.login(email, pass, YUS_DOMAIN))
    end

Maybe, this is bug of Session Handler.

commit
view · edit · sidebar · attach · print · history
Page last modified on May 17, 2013, at 06:21 AM