Caught exception in captiveportal::View::HTML->process "Undefined subroutine &captiveportal::PacketFence::Model::Portal::Session::enabled called at /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Model/Portal/Session.pm line 138."

Stack Trace

Package Line File
captiveportal::PacketFence::Model::Portal::Session 138 /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Model/Portal/Session.pm

135: if (defined $clientIp) { 136: $clientIp = clean_ip($clientIp); 137: while ( my ($network,$network_config) = each %ConfigNetworks ) { 138: next unless defined $network_config->{'fake_mac_enabled'} && enabled($network_config->{'fake_mac_enabled'}); 139: next if !pf::config::is_network_type_inline($network); 140: my $net_addr = NetAddr::IP->new($network,$network_config->{'netmask'}); 141: my $ip = new NetAddr::IP::Lite $clientIp;

captiveportal::PacketFence::Model::Portal::Session 157 /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Model/Portal/Session.pm

154: 155: sub _build_profile { 156: my ($self) = @_; 157: return pf::Portal::ProfileFactory->instantiate( $self->clientMac ); 158: } 159: 160: sub templateIncludePath {

captiveportal::PacketFence::Model::Portal::Session 162 /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Model/Portal/Session.pm

159: 160: sub templateIncludePath { 161: my ($self) = @_; 162: my $profile = $self->profile; 163: my @paths = ( $CAPTIVE_PORTAL{'TEMPLATE_DIR'} ); 164: if ( $profile->getName ne 'default' ) { 165: unshift @paths,

captiveportal::View::HTML 17 /usr/local/pf/html/captive-portal/lib/captiveportal/View/HTML.pm

14: 15: before process => sub { 16: my ( $self, $c ) = @_; 17: my $include_path = $c->portalSession->templateIncludePath; 18: @{ $self->include_path } = @$include_path; 19: }; 20:

Request

bless({
  _log             => bless({ abort => 1, autoflush => 0, watch_delay => 300 }, "Log::Log4perl::Catalyst"),
  _path            => "authenticate",
  _read_length     => 71,
  _read_position   => 71,
  action           => "authenticate",
  address          => "192.168.2.11",
  arguments        => [],
  base             => bless(do{\(my $o = "http://nac-server.lab.com/")}, "URI::http"),
  body_parameters  => {
                        aup_signed      => "on",
                        destination_url => "",
                        password        => 123,
                        submit          => "Login",
                        username        => "admin",
                      },
  captures         => [],
  cookies          => {},
  env              => {
                        "CONTENT_LENGTH"                  => 71,
                        "CONTENT_TYPE"                    => "application/x-www-form-urlencoded",
                        "DOCUMENT_ROOT"                   => "/usr/local/pf/html/captive-portal/lib",
                        "GATEWAY_INTERFACE"               => "CGI/1.1",
                        "HTTP_ACCEPT"                     => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                        "HTTP_ACCEPT_ENCODING"            => "gzip,deflate,sdch",
                        "HTTP_ACCEPT_LANGUAGE"            => "ru,en;q=0.8,ja;q=0.6,en-US;q=0.4",
                        "HTTP_CACHE_CONTROL"              => "max-age=0",
                        "HTTP_CONNECTION"                 => "keep-alive",
                        "HTTP_HOST"                       => "nac-server.lab.com",
                        "HTTP_ORIGIN"                     => "http://nac-server.lab.com",
                        "HTTP_REFERER"                    => "http://nac-server.lab.com/captive-portal?destination_url=http://www.gstatic.com/generate_204",
                        "HTTP_USER_AGENT"                 => "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36",
                        "HTTP_X_LIVEINTERNETAPPLICATIONS" => "Blogs.Offline",
                        "MOD_PERL"                        => "mod_perl/2.0.7",
                        "MOD_PERL_API_VERSION"            => 2,
                        "PATH"                            => "/sbin:/bin:/usr/bin:/usr/sbin",
                        "PATH_INFO"                       => "/authenticate",
                        "psgi.errors"                     => *main::STDERR,
                        "psgi.input"                      => bless(do{\(my $o = 3044192344)}, "Apache2::RequestRec"),
                        "psgi.multiprocess"               => 1,
                        "psgi.multithread"                => "",
                        "psgi.nonblocking"                => "",
                        "psgi.run_once"                   => "",
                        "psgi.streaming"                  => 1,
                        "psgi.url_scheme"                 => "http",
                        "psgi.version"                    => [1, 1],
                        "psgix.harakiri"                  => 1,
                        "QS_ConnectionId"                 => "13995605968477490006581",
                        "QUERY_STRING"                    => "",
                        "REMOTE_ADDR"                     => "192.168.2.11",
                        "REMOTE_PORT"                     => 59277,
                        "REQUEST_METHOD"                  => "POST",
                        "REQUEST_URI"                     => "/authenticate",
                        "SCRIPT_FILENAME"                 => "/usr/local/pf/html/captive-portal/register.cgi",
                        "SCRIPT_NAME"                     => "/",
                        "SCRIPT_URI"                      => "http://nac-server.lab.com/authenticate",
                        "SCRIPT_URL"                      => "/authenticate",
                        "SERVER_ADDR"                     => "192.168.2.200",
                        "SERVER_ADMIN"                    => "root\@nac-server.lab.com",
                        "SERVER_NAME"                     => "nac-server.lab.com",
                        "SERVER_PORT"                     => 80,
                        "SERVER_PROTOCOL"                 => "HTTP/1.1",
                        "SERVER_SIGNATURE"                => "",
                        "SERVER_SOFTWARE"                 => "Apache",
                      },
  headers          => bless({
                        "accept"                     => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                        "accept-encoding"            => "gzip,deflate,sdch",
                        "accept-language"            => "ru,en;q=0.8,ja;q=0.6,en-US;q=0.4",
                        "cache-control"              => "max-age=0",
                        "connection"                 => "keep-alive",
                        "content-length"             => 71,
                        "content-type"               => "application/x-www-form-urlencoded",
                        "host"                       => "nac-server.lab.com",
                        "origin"                     => "http://nac-server.lab.com",
                        "referer"                    => "http://nac-server.lab.com/captive-portal?destination_url=http://www.gstatic.com/generate_204",
                        "user-agent"                 => "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.132 Safari/537.36",
                        "x-liveinternetapplications" => "Blogs.Offline",
                      }, "HTTP::Headers"),
  match            => "authenticate",
  method           => "POST",
  parameters       => {
                        aup_signed      => "on",
                        destination_url => "",
                        password        => 123,
                        submit          => "Login",
                        username        => "admin",
                      },
  protocol         => "HTTP/1.1",
  query_keywords   => "",
  query_parameters => {},
  remote_user      => undef,
  secure           => 0,
  uploads          => {},
  uri              => bless(do{\(my $o = "http://nac-server.lab.com/authenticate")}, "URI::http"),
}, "Catalyst::Request")

Response

bless({
  _log => bless({ abort => 1, autoflush => 0, watch_delay => 300 }, "Log::Log4perl::Catalyst"),
  _response_cb => sub { ... },
  body => undef,
  cookies => {},
  finalized_headers => 0,
  headers => bless({
    "content-type" => "text/html; charset=utf-8",
    "x-catalyst"   => 5.90015,
  }, "HTTP::Headers"),
  status => 500,
}, "Catalyst::Response")

Stash

{
  current_model_instances => {
    "captiveportal::Model::Portal::Session" => bless({
      clientIp      => "192.168.2.11",
      forwardedFor  => undef,
      remoteAddress => "192.168.2.11",
    }, "captiveportal::Model::Portal::Session"),
  },
  template => "error.html",
  txt_message => "Caught exception in captiveportal::Controller::CaptivePortal->validateMac \"Undefined subroutine &captiveportal::PacketFence::Model::Portal::Session::enabled called at /usr/local/pf/html/captive-portal/lib/captiveportal/PacketFence/Model/Portal/Session.pm line 138.\"",
}

Config

do {
  my $a = {
    "Action::RenderView"                          => {
                                                       ignore_classes => [
                                                                           "DBIx::Class::ResultSource::Table",
                                                                           "DBIx::Class::ResultSourceHandle",
                                                                           "DateTime",
                                                                         ],
                                                       scrubber_func  => sub { ... },
                                                     },
    "default_view"                                => "HTML",
    "disable_component_resolution_regex_fallback" => 1,
    "home"                                        => "/usr/local/pf/html/captive-portal",
    "name"                                        => "captiveportal",
    "Plugin::ConfigLoader"                        => {},
    "Plugin::I18N"                                => { installed_languages => {} },
    "Plugin::Session"                             => {
                                                       chi_args          => { namespace => "httpd.portal" },
                                                       chi_class         => "pf::CHI",
                                                       cookie_name       => "CGISESSION",
                                                       expires           => 600,
                                                       verify_address    => 0,
                                                       verify_user_agent => 0,
                                                     },
    "Plugin::Static::Simple"                      => {
                                                       debug => 1,
                                                       dirs => [],
                                                       ignore_dirs => [
                                                         "pfappserver",
                                                         "templates",
                                                         "t",
                                                         "profile-templates",
                                                         "lib",
                                                         "script",
                                                       ],
                                                       ignore_extensions => ["cgi", "php", "inc", "tt", "html", "xml", "pl", "pm"],
                                                       include_path => [
                                                         sub { ... },
                                                         "/usr/local/pf/html/captive-portal",
                                                         "/usr/local/pf/html/common",
                                                         "/usr/local/pf/html",
                                                       ],
                                                       mime_types => { woff => "font/woff" },
                                                       mime_types_obj => bless({}, "MIME::Types"),
                                                       no_logs => 1,
                                                     },
    "root"                                        => bless({
                                                       dirs => ["", "usr", "local", "pf", "html", "captive-portal", "root"],
                                                       file_spec_class => undef,
                                                       volume => "",
                                                     }, "Path::Class::Dir"),
    "stacktrace"                                  => { context => 3, verbose => 0 },
    "static"                                      => 'fix',
  };
  $a->{"static"} = $a->{"Plugin::Static::Simple"};
  $a;
}

captiveportal on Catalyst 5.90015