Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apache::ASP patches for 'httponly' & 'remote_ip'
  • Loading branch information
sebthebert committed Apr 12, 2017
1 parent 512cab1 commit 287342b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
7 changes: 5 additions & 2 deletions LINUX/INSTALL.sh
Expand Up @@ -123,9 +123,12 @@ $MKDIR /var/lib/$OCTO/rrd_png/
$CHOWN /var/lib/$OCTO/rrd_png/
$LN /var/lib/$OCTO/rrd_png/ /usr/share/$OCTO/rrd

# Patch Apache::ASP::StateManager for HttpOnly cookie flag
# Patch Apache::ASP::StateManager for:
# - HttpOnly cookie flag
# - Apache 2.4 remote_ip
file_to_patch=$( find / -name StateManager.pm | grep "Apache/ASP" )
patch $file_to_patch < LINUX/apache-asp-statemanager.patch
patch $file_to_patch < LINUX/apache-asp-statemanager_httponly.patch
patch $file_to_patch < LINUX/apache-asp-statemanager_remote_ip.patch

#
# Octopussy FIFO creation (for Rsyslog)
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions LINUX/apache-asp-statemanager_remote_ip.patch
@@ -0,0 +1,11 @@
--- /usr/share/perl5/Apache/ASP/StateManager.pm 2016-11-14 22:47:59.812733840 +0000
+++ /usr/share/perl5/Apache/ASP/StateManager.pm.new 2016-11-14 22:47:33.561000465 +0000
@@ -82,7 +82,7 @@
$self->{cookie_path} = &config($self, 'CookiePath', undef, '/');
$self->{cookie_domain} = &config($self, 'CookieDomain');
$self->{paranoid_session} = &config($self, 'ParanoidSession');
- $self->{remote_ip} = $r->connection()->remote_ip();
+ $self->{remote_ip} = (defined $r->useragent_ip() ? $r->useragent_ip() : $r->connection()->remote_ip());
$self->{session_count} = &config($self, 'SessionCount');

# cookieless session support, cascading values

0 comments on commit 287342b

Please sign in to comment.