[freeside-commits] branch master updated. 2d54c6f57754b233f5ba7f19b34a26285ebab08e

Ivan ivan at 420.am
Wed Aug 7 12:05:57 PDT 2013


The branch, master has been updated
       via  2d54c6f57754b233f5ba7f19b34a26285ebab08e (commit)
       via  611b71ea70ac43bb52bf6d6b7e23a40694e430df (commit)
       via  a9e7226724fb8eba367f8d4781ddec1ac4cf97d6 (commit)
      from  a088e707d45a3e88ebc3ce6231c044b58c2347fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2d54c6f57754b233f5ba7f19b34a26285ebab08e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Aug 7 12:05:56 2013 -0700

    fix historical services showing up on invoices, RT#24405

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index dd0801c..dc3b93d 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -2601,7 +2601,7 @@ sub _items_cust_bill_pkg {
               if $DEBUG > 1;
 
             my @svc_labels = map &{$escape_function}($_),
-                        $cust_pkg->h_labels_short($self->_date, undef, 'I');
+                        $cust_pkg->h_labels_short(@dates, 'I');
             push @d, @svc_labels
               unless $cust_bill_pkg->pkgpart_override; #don't redisplay services
             $svc_label = $svc_labels[0];

commit 611b71ea70ac43bb52bf6d6b7e23a40694e430df
Merge: a9e7226 a088e70
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Aug 7 12:05:53 2013 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit a9e7226724fb8eba367f8d4781ddec1ac4cf97d6
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Aug 7 01:24:52 2013 -0700

    apache 2.4

diff --git a/FS/FS/AuthCookieHandler24.pm b/FS/FS/AuthCookieHandler24.pm
new file mode 100644
index 0000000..fa24890
--- /dev/null
+++ b/FS/FS/AuthCookieHandler24.pm
@@ -0,0 +1,46 @@
+package FS::AuthCookieHandler24;
+use base qw( Apache2::AuthCookie );
+
+use strict;
+use FS::UID qw( adminsuidsetup preuser_setup );
+use FS::CurrentUser;
+use FS::Auth;
+
+sub authen_cred {
+  my( $self, $r, $username, $password ) = @_;
+
+  preuser_setup();
+
+  my $info = {};
+
+  unless ( FS::Auth->authenticate($username, $password, $info) ) {
+    warn "failed auth $username from ". $r->useragent_ip. "\n";
+    return undef;
+  }
+
+  warn "authenticated $username from ". $r->useragent_ip. "\n";
+
+  FS::CurrentUser->load_user( $username,
+                              'autocreate' => FS::Auth->auth_class->autocreate,
+                              %$info,
+                            );
+
+  FS::CurrentUser->new_session;
+}
+
+sub authen_ses_key {
+  my( $self, $r, $sessionkey ) = @_;
+
+  preuser_setup();
+
+  my $curuser = FS::CurrentUser->load_user_session( $sessionkey );
+
+  unless ( $curuser ) {
+    warn "bad session $sessionkey from ". $r->useragent_ip. "\n";
+    return undef;
+  }
+
+  $curuser->username;
+}
+
+1;
diff --git a/FS/MANIFEST b/FS/MANIFEST
index 7e61868..803c521 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -27,6 +27,7 @@ bin/freeside-torrus-srvderive
 FS.pm
 FS/AccessRight.pm
 FS/AuthCookieHandler.pm
+FS/AuthCookieHandler24.pm
 FS/Auth/external.pm
 FS/Auth/internal.pm
 FS/Auth/legacy.pm
@@ -707,3 +708,13 @@ FS/part_pkg_currency.pm
 t/part_pkg_currency.t
 FS/cust_payby.pm
 t/cust_payby.t
+FS/vend_main.pm
+t/vend_main.t
+FS/vend_class.pm
+t/vend_class.t
+FS/vend_bill.pm
+t/vend_bill.t
+FS/vend_pay.pm
+t/vend_pay.t
+FS/vend_bill_pay.pm
+t/vend_bill_pay.t
diff --git a/Makefile b/Makefile
index 6ad9f8c..7cf6698 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,11 @@ MASONDATA = ${FREESIDE_CACHE}/masondata
 #package maintainers
 DIST_CONF = ${FREESIDE_CONF}/default_conf
 
+#mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x)
+#APACHE_VERSION=2
+#Apache 2.4 (Debian 8.x)
+APACHE_VERSION=2.4
+
 #deb
 FREESIDE_DOCUMENT_ROOT = /var/www/freeside
 #redhat, fedora, mandrake
@@ -65,8 +70,11 @@ HTTPD_RESTART = /etc/init.d/apache2 restart
 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
 
 #(an include directory, not a file, "Include /etc/apache/conf.d" in httpd.conf)
+#debian unstable/8.0+, apache2.4
+APACHE_CONF = /etc/apache2/conf-available
 #deb (3.1+), apache2
-APACHE_CONF = /etc/apache2/conf.d
+#APACHE_CONF = /etc/apache2/conf.d
+
 INSSERV_OVERRIDE = /etc/insserv/overrides
 
 FREESIDE_RESTART = ${INIT_FILE} restart
@@ -267,7 +275,7 @@ install-init:
 install-apache:
 	[ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true
 	[ -d ${APACHE_CONF} ] && \
-	  ( install -o root -m 755 htetc/freeside-base2.conf ${APACHE_CONF} && \
+	  ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \
 	    ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
 	    ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \
 	    perl -p -i -e "\
@@ -276,6 +284,9 @@ install-apache:
 	      s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \
 	    " ${APACHE_CONF}/freeside-*.conf \
 	  ) || true
+	[ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true
+	[ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true
+	[ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true
 	[ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true
 
 install-selfservice:
diff --git a/htetc/freeside-base2.4.conf b/htetc/freeside-base2.4.conf
new file mode 100644
index 0000000..c4e93f8
--- /dev/null
+++ b/htetc/freeside-base2.4.conf
@@ -0,0 +1,74 @@
+PerlModule Apache2::compat
+
+#PerlModule Apache::DBI
+
+PerlModule HTML::Mason
+PerlSetVar MasonArgsMethod CGI
+PerlModule HTML::Mason::ApacheHandler
+
+PerlChildInitHandler "sub { srand }"
+
+PerlRequire "%%%MASON_HANDLER%%%"
+
+#Locale::SubCountry
+#
+AddDefaultCharset UTF-8
+
+PerlModule FS::AuthCookieHandler24
+PerlAddAuthzProvider user FS::AuthCookieHandler24->authz_handler
+
+#XXX need to also work properly for installs w/o /freeside/ in path
+PerlSetVar FreesideLoginScript /freeside/loginout/login.html
+
+#PerlSetVar FreesideEverSecure 1
+PerlSetVar FreesideHttpOnly 1
+
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
+
+    #work around Apache2::AuthCookie vs. mod_dir
+    DirectoryIndex disabled
+    Options -Indexes
+    #XXX need to also work properly for installs w/o /freeside/ in path
+    RewriteEngine On
+    RewriteBase /freeside/
+    RewriteRule ^/?$ /freeside/index.html [L,R=301]
+
+    AuthName Freeside
+    AuthType FS::AuthCookieHandler24
+    PerlAuthenHandler FS::AuthCookieHandler24->authenticate
+    require valid-user
+
+    <Files ~ "(\.cgi|\.html)$">
+        SetHandler perl-script
+        PerlHandler HTML::Mason
+    </Files>
+
+</Directory>
+
+<Files login>
+    AuthName Freeside
+    AuthType FS::AuthCookieHandler24
+    SetHandler perl-script
+    PerlHandler FS::AuthCookieHandler24->login
+</Files>
+
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/loginout/>
+    <Files "login.html">
+        Satisfy any
+    </Files>
+</Directory>
+
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/elements/>
+    <Files "freeside.css">
+        Satisfy any
+    </Files>
+</Directory>
+
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/Helpers/>
+    SetHandler perl-script
+    PerlHandler HTML::Mason
+</Directory>
+
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/REST/1.0/NoAuth/>
+    Satisfy any
+</Directory>

-----------------------------------------------------------------------

Summary of changes:
 ...AuthCookieHandler.pm => AuthCookieHandler24.pm} |    8 +++---
 FS/FS/Template_Mixin.pm                            |    2 +-
 FS/MANIFEST                                        |   11 ++++++++
 Makefile                                           |   15 +++++++++-
 .../{freeside-base2.conf => freeside-base2.4.conf} |   27 ++++++++++++++-----
 5 files changed, 49 insertions(+), 14 deletions(-)
 copy FS/FS/{AuthCookieHandler.pm => AuthCookieHandler24.pm} (75%)
 copy htetc/{freeside-base2.conf => freeside-base2.4.conf} (61%)




More information about the freeside-commits mailing list