Skip to content

Commit e0c1ee8

Browse files
authored
Fix getRealIP() to only return originating user's source IP
If we end up with a list of IP addresses, then we only want the first one which will be the requesting user's IP.
1 parent b0c9c80 commit e0c1ee8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interceptors/Security.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ component accessors="true" extends="coldbox.system.Interceptor" {
737737
return headers[ "X-Forwarded-For" ];
738738
}
739739

740-
return len( CGI.REMOTE_ADDR ) ? CGI.REMOTE_ADDR : "127.0.0.1";
740+
return len( CGI.REMOTE_ADDR ) ? trim( listFirst( CGI.REMOTE_ADDR ) ) : "127.0.0.1";
741741
}
742742

743743
/**

0 commit comments

Comments
 (0)