Displaying 20 results from an estimated 10000 matches similar to: "request.remote_ip returns kok + ip"
2008 Feb 24
1
Problems with request.remote_ip
Hello everyone,
I am trying to use request.remote_ip in my application to log a user''s
IP address because I have been having a lot of abuse issues. basically
when a user logs I simply call user.update_attribute(:last_ip,
request.remote_ip). The problem is that for some reason a lot of people
that have recently logged in still have NULL listed as their last_ip in
the database, even
2009 Feb 09
3
can't call request.remote_ip from object?
class User
def update_metadata
self.update_attributes({:last_login_at => Time.now,
:last_known_up => request.remote_ip,
:last_known_user_agent =>
request.user_agent})
end
This does not work. It bombs out with:
undefined local variable or method `request'' for #<User:0x1e146e0>
But the request calls work in a
2007 Nov 23
4
help! problem with mongrel, request.remote_ip and lighttpd
I have an existing rails application on lighttpd and I am trrying to upgrade
to mongrel for the enhanced scalability it offers.
I am running mongrel 1.1.1, rails 1.2.5, lighttpd 1.4.13 and ruby 1.8.5
Everything is working great except request.remote_ip returns 127.0.0.1 or
192.168.0.102 (the internal network address of the server running lighty).
I''ve seen some older posts about
2007 Jul 09
7
request.remote_ip
Hi,
How can i access to request.remote_ip in a model?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
2007 Nov 23
2
Unable to read anything from request.remote_ip
For some users, request.remote_ip always return nil. According to the
RAILS''s help:
REMOTE_ADDR is the standard but will fail if the user is behind a proxy.
HTTP_CLIENT_IP and/or HTTP_X_FORWARDED_FOR are set by proxies so check
for these before falling back to REMOTE_ADDR. HTTP_X_FORWARDED_FOR may
be a comma- delimited list in the case of multiple chained proxies; the
first is the
2006 Aug 25
8
Tutorials
Getting a bit frustrated with the documentation of RoR I ask you if you
can recommend a good tutorial that I''ve missed :-)
The current problem that I''m stuck with is forms and list and how to
display or not to display columns.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed
2010 Mar 02
1
request.remote_ip with AJAX
Hello everyone. I have a problem with "request.remote_ip" I made an
array:
1 ip = request.remote_ip
2 $ address [ip] = (: test => "OK")
...
...
...
11 ip = request.remote_ip # (along with a lot of AJAX calls)
12 response = $ address [ip] [: test]
It often works, but sometimes it gives me this error:
NoMethodError (undefined method `[] ''for nil:
2009 Aug 21
2
Requesting a remote ip in plugin
Im creating plugin for limiting the ip, i have included the plugin
name in my controller
Controller:
class AdminController < ApplicationController
acts_as_ratelimit
def login
session[:user_id] = nil
if request.post?
user = User.authenticate(params[:name], params[:password])
if user
session[:user_id] = user.id
redirect_to(:controller=>"products", :action =>
2008 Jul 28
0
Re: remote_ip always returns 127.0.0.1 (apache)
On Mon, Jul 28, 2008 at 3:09 PM, Luca Scaljery
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
> I have my webrick server behind apache (all on the same server). The
> problem I have now is that request.remote_ip always returns 127.0.0.1.
> So it gets this IP from apache (I guess). How do I get the true client
> IP address
request.env[
2008 Sep 16
7
id in form_tag for update
I get an error saying Rails can''t find the post because I don''t have an
id when doing the update. I have:
<% form_tag ''/meetings/update'', :id => @calendar.id, :onsubmit =>
''return ValidateMeeting()'' do %>
Is this wrong?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You
2010 Jul 27
3
Rack in Rails
Does Rack come with Rails or do I need to install the gem?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2009 Apr 24
4
Long string in crypting
I use a solution to crypt a string that I found using OpenSSL. But the
crypted string becomes very long, too long for a varchar 255 to hold it.
What can I do to make it shorter? Or should I just use text as column in
the mysql db?
public_key_file = ''lib/public.pem''
public_key = OpenSSL::PKey::RSA.new(File.read(public_key_file))
@encrypted_string =
2004 Jul 09
1
passing remote ip to pam
to improve forensic log info i want to set the PAM_RHOST value to the
remote ip (which pam logs as rhost=foo in failure messages). i didn't
look to see if anything has been done in this way on CVS because i'm still
on 0.99.10.6.
below is a bit of a hack. in some sense the remote_ip might make more
sense in the AUTH_LOGIN_REQUEST_NEW packet rather than the continue
packet... but that
2010 Sep 21
6
Iterate HashWithIndifferentAccess
How do I iterate a HashWithIndifferentAccess? I need to set the order
using a sortable_element.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send
2010 Oct 28
3
SIP client floods port 5060 and gets blocked
Hello,
Is there any reason why an IP-phone would pounder on port 5060 ? My
firewall blocks the public IP because it thinks the remote IP is port
scanning on port 5060.
I think the phone is just registering but for some reason it does this
repeatedly in a very short time.
Oct 28 09:01:48 astserver kernel: Firewall: *UDP_IN Blocked* IN=eth0
OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:00:00
2009 Aug 10
12
v2.0 configuration parsing
I'm trying to figure out how exactly v2.0 should be parsing
configuration files. The most annoying part is if it should always just
"use whatever comes first in config" or try some kind of a "use most
specific rule". The "most specific" kind of makes more sense initially,
but then you start wondering how to handle e.g.:
1) User logs in to imap from 192.168.0.1.
2008 Aug 31
1
File field becomes String
I have a file_field that works fine when sending up a file. But when
making an update the same field behaves like a String, and consequently
the params[:file][:attachment].content_type fails. Why is this?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Dec 22
1
How do I use GDB to debug Litespeed Server?
How do I debug Litespeed Server on Mac OS 10.5 with GDB? I haven''t a
clue on how to proceed. I haven''t used GDB before.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2020 Aug 25
2
Metric label values truncated when using OpenMetrics endpoint
Hi Jeff,
Thanks for your reply!
Regarding grouping by remote address, I understand and for now I'll keep a close eye. Maybe it's an option to group by /24 for ipv4 and /64 for IPv6? We currently do that based on the logs but the OpenMetrics endpoint seem a lot easier.
A slight hijack of the original question: but I tried to log only IP addresses (+ result) of failed login attempts but
2010 Nov 16
1
Help - custom vpopmail
Hi,
First, I'm not sure if dovecot should alter this, but it seems vpopmail
writes the IP into the 'remote_ip' field instead of the auth type. Dovecot
still writes the auth type.? I want both.
So I modified my vpopmail install to write an additional field into the
lastauth table.? My custom vpopmail writes the remote IP into remote_ip,
and the auth type into a 'type'