diff --git "a/test.csv" "b/test.csv" new file mode 100644--- /dev/null +++ "b/test.csv" @@ -0,0 +1,92609 @@ +sha,github,commit_message,git_diff,is_security +3a76fd7c95fced2c2f8c8148a9055c3a542eff29,https://github.com/the-tcpdump-group/tcpdump/commit/3a76fd7c95fced2c2f8c8148a9055c3a542eff29,"CVE-2017-12995/Check for DNS compression pointers that don't point backwards. + +This is what BIND 9.11.0-P2 does; it not only detects pointers that +loop, as ""point backwards"" means ""point before anything we've processed +so far, including what we're processing right now"", so the pointer can't +point to itself (as that's what we're processing right now). + +This fixes an infinite loop discovered by Forcepoint's security +researchers Otto Airamo & Antti Levomäki. + +Add a test using the capture file supplied by the reporter(s). + +Also, add some infinite-pointer-loop captures. + +More checks should be done. We might, for example, want to make sure +the upper 2 bits of the label length/pointer byte are 00 or 11, and that +if we encounter a pointer and jump backwards to what we think is a label +the label ends before the beginning of the last label we processed, to +make sure the pointer doesn't point backwards into the *middle* of a +label, and also make sure the entire name is <= 255 bytes long.","diff --git a/print-domain.c b/print-domain.c +index d0b6996fd..9a2b9e856 100644 +--- a/print-domain.c ++++ b/print-domain.c +@@ -151,15 +151,14 @@ ns_nprint(netdissect_options *ndo, + register u_int i, l; + register const u_char *rp = NULL; + register int compress = 0; +- int chars_processed; + int elt; +- int data_size = ndo->ndo_snapend - bp; ++ u_int offset, max_offset; + + if ((l = labellen(ndo, cp)) == (u_int)-1) + return(NULL); + if (!ND_TTEST2(*cp, 1)) + return(NULL); +- chars_processed = 1; ++ max_offset = (u_int)(cp - bp); + if (((i = *cp++) & INDIR_MASK) != INDIR_MASK) { + compress = 0; + rp = cp + l; +@@ -174,24 +173,28 @@ ns_nprint(netdissect_options *ndo, + } + if (!ND_TTEST2(*cp, 1)) + return(NULL); +- cp = bp + (((i << 8) | *cp) & 0x3fff); ++ offset = (((i << 8) | *cp) & 0x3fff); ++ /* ++ * This must move backwards in the packet. ++ * No RFC explicitly says that, but BIND's ++ * name decompression code requires it, ++ * as a way of preventing infinite loops ++ * and other bad behavior, and it's probably ++ * what was intended (compress by pointing ++ * to domain name suffixes already seen in ++ * the packet). ++ */ ++ if (offset >= max_offset) { ++ ND_PRINT((ndo, """")); ++ return(NULL); ++ } ++ max_offset = offset; ++ cp = bp + offset; + if ((l = labellen(ndo, cp)) == (u_int)-1) + return(NULL); + if (!ND_TTEST2(*cp, 1)) + return(NULL); + i = *cp++; +- chars_processed++; +- +- /* +- * If we've looked at every character in +- * the message, this pointer will make +- * us look at some character again, +- * which means we're looping. +- */ +- if (chars_processed >= data_size) { +- ND_PRINT((ndo, """")); +- return (NULL); +- } + continue; + } + if ((i & INDIR_MASK) == EDNS0_MASK) { +@@ -212,14 +215,12 @@ ns_nprint(netdissect_options *ndo, + } + + cp += l; +- chars_processed += l; + ND_PRINT((ndo, ""."")); + if ((l = labellen(ndo, cp)) == (u_int)-1) + return(NULL); + if (!ND_TTEST2(*cp, 1)) + return(NULL); + i = *cp++; +- chars_processed++; + if (!compress) + rp += l + 1; + } +diff --git a/tests/TESTLIST b/tests/TESTLIST +index ec627cb82..0ddc63e39 100644 +--- a/tests/TESTLIST ++++ b/tests/TESTLIST +@@ -474,6 +474,7 @@ zephyr-oobr zephyr-oobr.pcap zephyr-oobr.out -vvv -e + isakmp-no-none-np isakmp-no-none-np.pcap isakmp-no-none-np.out -vvv -e + telnet-iac-check-oobr telnet-iac-check-oobr.pcap telnet-iac-check-oobr.out -vvv -e + resp_4_infiniteloop resp_4_infiniteloop.pcap resp_4_infiniteloop.out -vvv -e ++dns_fwdptr dns_fwdptr.pcap dns_fwdptr.out -vvv -e + + # RTP tests + # fuzzed pcap +@@ -483,3 +484,11 @@ rtp-seg-fault-2 rtp-seg-fault-2.pcap rtp-seg-fault-2.out -v -T rtp + # NFS tests + # fuzzed pcap + nfs-seg-fault-1 nfs-seg-fault-1.pcap nfs-seg-fault-1.out ++ ++# DNS infinite loop tests ++# ++# See http://marc.info/?l=tcpdump-workers&m=95552439022555 ++# ++dns-zlip-1 dns-zlip-1.pcap dns-zlip-1.out ++dns-zlip-2 dns-zlip-2.pcap dns-zlip-2.out ++dns-zlip-3 dns-zlip-3.pcap dns-zlip-3.out +diff --git a/tests/dns-zlip-1.out b/tests/dns-zlip-1.out +new file mode 100644 +index 000000000..ce12748da +--- /dev/null ++++ b/tests/dns-zlip-1.out +@@ -0,0 +1 @@ ++IP 10.0.0.1.1024 > 146.84.28.88.53: 60777 Type49159 (Class 49168)? [|domain] +diff --git a/tests/dns-zlip-1.pcap b/tests/dns-zlip-1.pcap +new file mode 100644 +index 000000000..4ec844c0f +Binary files /dev/null and b/tests/dns-zlip-1.pcap differ +diff --git a/tests/dns-zlip-2.out b/tests/dns-zlip-2.out +new file mode 100644 +index 000000000..dbabefbfc +--- /dev/null ++++ b/tests/dns-zlip-2.out +@@ -0,0 +1 @@ ++IP 10.0.0.1.1024 > 146.84.28.88.53: 18992 Type49164 (Class 49168)? [|domain] +diff --git a/tests/dns-zlip-2.pcap b/tests/dns-zlip-2.pcap +new file mode 100644 +index 000000000..5f74f2264 +Binary files /dev/null and b/tests/dns-zlip-2.pcap differ +diff --git a/tests/dns-zlip-3.out b/tests/dns-zlip-3.out +new file mode 100644 +index 000000000..beb173045 +--- /dev/null ++++ b/tests/dns-zlip-3.out +@@ -0,0 +1 @@ ++IP 10.0.0.1.1024 > 146.84.28.88.53: 65483 Type49164 (Class 49164)? thisleetostringwillcrashyourlittlenameserverforsurehahahahahah.[|domain] +diff --git a/tests/dns-zlip-3.pcap b/tests/dns-zlip-3.pcap +new file mode 100644 +index 000000000..c0c076a63 +Binary files /dev/null and b/tests/dns-zlip-3.pcap differ +diff --git a/tests/dns_fwdptr.out b/tests/dns_fwdptr.out +new file mode 100644 +index 000000000..4a37b7fb3 +--- /dev/null ++++ b/tests/dns_fwdptr.out +@@ -0,0 +1,2 @@ ++be:af:ca:ce:ff:ff > de:ad:be:ef:00:01, ethertype IPv4 (0x0800), length 63207: (tos 0x0, ttl 128, id 36039, offset 0, flags [none], proto UDP (17), length 63193) ++ 156.118.17.235.53 > 156.118.27.229.500: [udp sum ok] 51584 zoneRef NoChange*|$ [64259q] q: Type507 (Class 769)? M-{.^AM-{^C.M-{.^AM-{^C.M-{.^AM-{^C.M-{.^AM-{^C.M-{.^AM-{ .M-{^C^A.[|domain] +diff --git a/tests/dns_fwdptr.pcap b/tests/dns_fwdptr.pcap +new file mode 100644 +index 000000000..67a846119 +Binary files /dev/null and b/tests/dns_fwdptr.pcap differ +",1 +ed7365064c189b8f136a9f952062249167d1bd9e,https://github.com/webmin/webmin/commit/ed7365064c189b8f136a9f952062249167d1bd9e,Prevent passing in of monitor type that could contain invalid characters https://sourceforge.net/tracker/index.php?func=detail&aid=3542038&group_id=17457&atid=117457#,"diff --git a/status/edit_mon.cgi b/status/edit_mon.cgi +index cda0c648d8..1233edc30b 100755 +--- a/status/edit_mon.cgi ++++ b/status/edit_mon.cgi +@@ -9,6 +9,7 @@ $access{'edit'} || &error($text{'mon_ecannot'}); + @handlers = &list_handlers(); + if ($in{'type'}) { + # Create a new monitor ++ $in{'type'} =~ /^[a-zA-Z0-9\_\-\.]+$/ || &error($text{'mon_etype'}); + $type = $in{'type'}; + $title = $text{'mon_create'}; + if ($in{'clone'}) { +diff --git a/status/lang/en b/status/lang/en +index 968ff905cd..1a4d5ae9cc 100644 +--- a/status/lang/en ++++ b/status/lang/en +@@ -104,6 +104,7 @@ mon_eremote2=Webmin server $1 could not be contacted : $2 + mon_estatus=Webmin server $1 does not have the System and Server Status module + mon_ecannot=You are not allowed to edit monitors + mon_ertype=This monitor type is not available on $1 ++mon_etype=Invalid monitor type name + mon_runon=Run commands on + mon_runon0=This server + mon_runon1=The remote host +diff --git a/status/save_mon.cgi b/status/save_mon.cgi +index 9579fd5b8a..7444e91d36 100755 +--- a/status/save_mon.cgi ++++ b/status/save_mon.cgi +@@ -6,6 +6,7 @@ require './status-lib.pl'; + $access{'edit'} || &error($text{'mon_ecannot'}); + &ReadParse(); + if ($in{'type'}) { ++ $in{'type'} =~ /^[a-zA-Z0-9\_\-\.]+$/ || &error($text{'mon_etype'}); + $serv->{'type'} = $in{'type'}; + $serv->{'id'} = time(); + } +",1 +632f5fcc2222067fae9e367de2be6989c1b9f14d,https://github.com/F21/jwt/commit/632f5fcc2222067fae9e367de2be6989c1b9f14d,Fix required PHP version in composer.json.,"diff --git a/composer.json b/composer.json +index fd66a72..dbeb682 100644 +--- a/composer.json ++++ b/composer.json +@@ -1,23 +1,27 @@ +-{ +- ""name"": ""f21/jwt"", +- ""type"": ""library"", +- ""description"": ""JWT (JSON Web Tokens) for PHP"", +- ""keywords"": [""jwt"", ""json web tokens""], +- ""homepage"": ""https://github.com/F21/jwt"", +- ""license"": ""MIT"", +- ""authors"": [ +- { +- ""name"": ""Francis Chuang"", +- ""email"": ""francis.chuang@gmail.com"", +- ""role"": ""Developer"" +- } +- ], +- ""require"": { +- ""php"": "">=5.3.0"" +- }, +- ""autoload"": { +- ""psr-0"": { +- ""JWT"": ""JWT/"" +- } +- } +-} ++{ ++ ""name"" : ""f21/jwt"", ++ ""description"" : ""JWT (JSON Web Tokens) for PHP"", ++ ""type"" : ""library"", ++ ""authors"" : [{ ++ ""name"" : ""Francis Chuang"", ++ ""email"" : ""francis.chuang@gmail.com"", ++ ""role"" : ""Developer"" ++ } ++ ], ++ ""keywords"" : [ ++ ""jwt"", ++ ""json web tokens"" ++ ], ++ ""homepage"" : ""https://github.com/F21/jwt"", ++ ""license"" : [ ++ ""MIT"" ++ ], ++ ""require"" : { ++ ""php"" : "">=5.4.8"" ++ }, ++ ""autoload"" : { ++ ""psr-0"" : { ++ ""JWT"" : ""JWT/"" ++ } ++ } ++} +\ No newline at end of file +",0 +159daeab6adfe828bd06e6e74f5b647bf9b1bb70,https://github.com/Chevereto/Chevereto-Free/commit/159daeab6adfe828bd06e6e74f5b647bf9b1bb70,"v1.0.13 + +Fixed post handling in /settings (name, bio)","diff --git a/app/app.php b/app/app.php +index 78d313b..ac1960e 100644 +--- a/app/app.php ++++ b/app/app.php +@@ -1,6 +1,6 @@ + NULL, + '1.0.12' => NULL, ++ '1.0.13' => NULL, + ]; + // Settings that must be renamed from NAME to NEW NAME and DELETE old NAME + $settings_rename = []; +diff --git a/app/routes/route.settings.php b/app/routes/route.settings.php +index 71f7ac4..9911dae 100644 +--- a/app/routes/route.settings.php ++++ b/app/routes/route.settings.php +@@ -9,7 +9,7 @@ + + + Copyright (C) Rodolfo Berrios A. All rights reserved. +- ++ + BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA + http://chevereto.com/license + +@@ -17,46 +17,46 @@ + + $route = function($handler) { + try { +- ++ + if($_POST and !$handler::checkAuthToken($_REQUEST['auth_token'])) { + $handler->template = 'request-denied'; + return; + } +- ++ + $logged_user = CHV\Login::getUser(); +- ++ + if(!$logged_user) { + G\redirect('login'); + } +- ++ + // User status override redirect + CHV\User::statusRedirect($logged_user['status']); +- ++ + // Dashboard hack + $handler->template = 'settings'; + $is_dashboard_user = $handler::getCond('dashboard_user'); +- ++ + // Request log + if(!$is_dashboard_user) { + $request_log = CHV\Requestlog::getCounts('account-edit', 'fail'); + } +- ++ + // Editable values + $allowed_to_edit = ['name', 'username', 'email', 'avatar_filename', 'website', 'background_filename', 'timezone', 'language', 'status', 'is_admin', 'image_keep_exif', 'image_expiration', 'newsletter_subscribe', 'bio', 'show_nsfw_listings', 'is_private']; +- ++ + if(CHV\getSetting('enable_expirable_uploads')) { + unset($allowed_to_edit['image_expiration']); + } +- ++ + // User handle + $user = $is_dashboard_user ? CHV\User::getSingle($handler->request[1], 'id') : $logged_user; + $is_owner = $user['id'] == CHV\Login::getUser()['id']; +- ++ + // Update the lang displayed on change + if(in_array('language', $allowed_to_edit) and isset($_POST['language']) and $logged_user['language'] !== $_POST['language'] and $logged_user['id'] == $user['id'] and array_key_exists($_POST['language'], CHV\L10n::getEnabledLanguages())) { + CHV\L10n::processTranslation($_POST['language']); + } +- ++ + // Settings routes + $routes = [ + 'account' => _s('Account'), +@@ -65,26 +65,26 @@ + 'homepage' => _s('Homepage') + ]; + $default_route = 'account'; +- ++ + if(CHV\getSetting('website_mode') == 'personal' and CHV\getSetting('website_mode_personal_routing') !== '/' and $logged_user['id'] == CHV\getSetting('website_mode_personal_uid')) { + $route_homepage = TRUE; + } +- ++ + $is_email_required = TRUE; + // Don't require email for admin when editing users + if($handler::getCond('admin') AND !$is_owner) { + $is_email_required = FALSE; + } +- ++ + $doing_level = $is_dashboard_user ? 2 : 0; + $doing = $handler->request[$doing_level]; + + if(!$user or $handler->request[$doing_level+1] or (!is_null($doing) and !array_key_exists($doing, $routes))) { + return $handler->issue404(); + } +- ++ + if($doing == '') $doing = $default_route; +- ++ + // Populate the routes + foreach($routes as $route => $label) { + $aux = str_replace('_', '-', $route); +@@ -101,42 +101,42 @@ + 'current' => $handler::getCond('settings_'.$aux) + ); + } +- ++ + $handler::setVar('settings_menu', $settings_menu); +- ++ + if(!array_key_exists($doing, $routes)) { + return $handler->issue404(); + } +- ++ + // Safe print $_POST +- $SAFE_POST = $handler::getVar('safe_post'); +- ++ $SAFE_POST = $handler::getVar('safe_post'); ++ + // conds + $is_error = false; + $is_changed = false; + $captcha_needed = false; +- ++ + // vars + $input_errors = array(); + $error_message = NULL; + $changed_email_message = NULL; +- ++ + if($_POST) { +- ++ + $field_limits = 255; +- ++ + foreach($allowed_to_edit as $k) { + if($_POST[$k]) { + $_POST[$k] = substr($_POST[$k], 0, $field_limits); + } + } +- ++ + // Input validations + switch($doing) { +- ++ + case NULL: + case 'account': +- ++ + $checkboxes = ['upload_image_exif', 'newsletter_subscribe', 'show_nsfw_listings', 'is_private']; + foreach($checkboxes as $k) { + if(!isset($_POST[$k])) { +@@ -144,9 +144,9 @@ + } + $_POST[$k] = in_array($_POST[$k], ['On', 1]) ? 1 : 0; + } +- ++ + G\nullify_string($_POST['image_expiration']); +- ++ + $__post = []; + $__safe_post = []; + foreach(['username', 'email'] as $v) { +@@ -156,25 +156,25 @@ + $__safe_post[$v] = G\safe_html($_POST[$v]); + } + } +- ++ + $handler::updateVar('post', $__post); + $handler::updateVar('safe_post', $__safe_post); +- ++ + if(!CHV\User::isValidUsername($_POST['username'])) { + $input_errors['username'] = _s('Invalid username'); + } +- ++ + if($is_email_required and !filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) { + $input_errors['email'] = _s('Invalid email'); + } +- ++ + if(CHV\getSetting('enable_expirable_uploads')) { + // Image expire time + if($_POST['image_expiration'] !== NULL && (!G\dateinterval($_POST['image_expiration']) || !array_key_exists($_POST['image_expiration'], CHV\Image::getAvailableExpirations()))) { + $input_errors['image_expiration'] = _s('Invalid image expiration: %s', $_POST['image_expiration']); + } + } +- ++ + if(!array_key_exists($_POST['language'], CHV\get_available_languages())) { + $_POST['language'] = CHV\getSetting('default_language'); + } +@@ -185,17 +185,17 @@ + if(count($input_errors) > 0) { + $is_error = true; + } +- ++ + if(!$is_error) { +- ++ + $user_db = CHV\DB::get('users', ['username' => $_POST['username'], 'email' => $_POST['email']], 'OR', NULL); +- ++ + if($user_db) { +- ++ + foreach($user_db as $row) { +- ++ + if($row['user_id'] == $user['id']) continue; // Same guy? +- ++ + // Invalid user, check the time + if(!in_array($row['user_status'], ['valid', 'banned'])) { // Don't touch the valid and banned users + $must_delete_old_user = false; +@@ -215,7 +215,7 @@ + continue; + } + } +- ++ + // Username taken? + if(G\timing_safe_compare($row['user_username'], $_POST['username']) and $user['username'] !== $row['user_username']) { + $input_errors['username'] = 'Username already being used'; +@@ -226,7 +226,7 @@ + $input_errors['email'] = _s('Email already being used'); + } + } +- ++ + if(count($input_errors) > 0) { + $is_error = true; + } +@@ -235,10 +235,10 @@ + + // Email MUST be validated (two steps) + if(!$is_error && !empty($_POST['email']) && !G\timing_safe_compare($user['email'], $_POST['email'])) { +- ++ + // Delete any old confirmation + CHV\Confirmation::delete(['type' => 'account-change-email', 'user_id' => $user['id']]); +- ++ + // Generate the thing + $hashed_token = CHV\generate_hashed_token($user['id']); + $insert_email_confirm = CHV\Confirmation::insert([ +@@ -249,20 +249,20 @@ + 'extra' => $_POST['email'] + ]); + $email_confirm_link = G\get_base_url('account/change-email-confirm/?token='.$hashed_token['public_token_format']); +- $changed_email_message = _s('An email has been sent to %s with instructions to activate this email', $SAFE_POST['email']); +- ++ $changed_email_message = _s('An email has been sent to %s with instructions to activate this email', $SAFE_POST['email']); ++ + // Build the mail global + global $theme_mail; + $theme_mail = [ + 'user' => $user, + 'link' => $email_confirm_link + ]; +- ++ + ob_start(); + require_once(G_APP_PATH_THEME . 'mails/account-change-email.php'); + $mail_body = ob_get_contents(); + ob_end_clean(); +- ++ + $mail['subject'] = _s('Confirmation required at %s', CHV\getSettings()['website_name']); + $mail['message'] = $mail_body; + +@@ -273,13 +273,13 @@ + } catch(Exception $e) { + echo($e->getMessage()); + } +- ++ + unset($_POST['email']); +- ++ + } +- ++ + break; +- ++ + case 'profile': + if(!preg_match('/^.{1,60}$/', $_POST['name'])) { + $input_errors['name'] = _s('Invalid name'); +@@ -288,9 +288,9 @@ + $input_errors['website'] = _s('Invalid website'); + } + break; +- ++ + case 'password': +- ++ + if(!$is_dashboard_user) { + if($user['login']['password'] && !password_verify($_POST['current-password'], $user['login']['password']['secret'])) { + $input_errors['current-password'] = _s('Wrong password'); +@@ -301,23 +301,23 @@ + } + } + } +- ++ + if(!preg_match('/'.CHV\getSetting('user_password_pattern').'/', $_POST['new-password'])) { + $input_errors['new-password'] = _s('Invalid password'); + } +- ++ + if($_POST['new-password'] !== $_POST['new-password-confirm']) { + $input_errors['new-password-confirm'] = _s(""Passwords don't match""); + } + + break; +- ++ + case 'homepage': + if(!array_key_exists($doing, $routes)) { // Nope + $handler->issue404(); + } + $allowed_to_edit = ['homepage_title_html', 'homepage_paragraph_html', 'homepage_cta_html']; +- ++ + // Protect editing + $editing_array = G\array_filter_array($_POST, $allowed_to_edit, 'exclusion'); + $update_settings = []; +@@ -325,7 +325,7 @@ + if(!array_key_exists($k, CHV\Settings::get()) or CHV\Settings::get($k) == $editing_array[$k]) continue; + $update_settings[$k] = $editing_array[$k]; + } +- ++ + // Update settings (if any) + if($update_settings) { + $db = CHV\DB::getInstance(); +@@ -344,21 +344,21 @@ + } + } + break; +- ++ + default: + $handler->issue404(); + break; + } +- ++ + if(count($input_errors) > 0) { + $is_error = true; + } +- ++ + if(!$is_error) { +- ++ + // Account and profile changes + if(in_array($doing, [NULL, 'account', 'profile'])) { +- ++ + // Detect changes + foreach($_POST as $k => $v) { + if($user[$k] !== $v) { +@@ -367,10 +367,10 @@ + } + + if($is_changed) { +- ++ + // Protect editing + $editing_array = G\array_filter_array($_POST, $allowed_to_edit, 'exclusion'); +- ++ + if(!$is_dashboard_user) { + unset($editing_array['status'], $editing_array['is_admin']); + } else { +@@ -392,9 +392,12 @@ + + if(CHV\User::update($user['id'], $editing_array)) { + $user = array_merge($user, $editing_array); +- $handler::updateVar('safe_post', ['name' => CHV\User::sanitizeUserName($_POST['name'])]); ++ // 'name' gets sanitized on User::update, this update safe_post to reflect the actual value ++ $handler::updateVar('safe_post', [ ++ 'name' => G\safe_html($user['name']), ++ ]); + } +- ++ + if(!$is_dashboard_user) { + $logged_user = CHV\Login::login($user['id'], $_SESSION['login']['type']); + } else { +@@ -403,39 +406,39 @@ + $changed_message = _s('Changes have been saved.'); + } + } +- ++ + // Update/create password + if($doing == 'password') { +- ++ + if($user['login']['password']) { +- ++ + // Delete any old cookie/session login for this user + CHV\Login::delete(['type' => 'cookie', 'user_id' => $user['id']]); + CHV\Login::delete(['type' => 'session', 'user_id' => $user['id']]); +- ++ + // Insert the new login DB if needed + if(!$is_dashboard_user and $_COOKIE['KEEP_LOGIN']) { + CHV\Login::insert(['type' => 'cookie', 'user_id' => $user['id']]); + } +- ++ + $is_changed = CHV\Login::changePassword($user['id'], $_POST['new-password']); // This inserts the session login + $changed_message = _s('Password has been changed'); +- ++ + } else { // Insert +- ++ + $is_changed = CHV\Login::addPassword($user['id'], $_POST['new-password']); + $changed_message = _s('Password has been created.'); + if(!$is_dashboard_user or $logged_user['id'] == $user['id']) { + $logged_user = CHV\Login::login($user['id'], 'password'); + } + } +- ++ + $unsets = array('current-password', 'new-password', 'new-password-confirm'); + foreach($unsets as $unset) { + $handler::updateVar('safe_post', [$unset => NULL]); + } + } +- ++ + } else { + if(in_array($doing, array('', 'account')) and !$is_dashboard_user) { + CHV\Requestlog::insert(array('type' => 'account-edit', 'result' => 'fail')); +@@ -444,29 +447,29 @@ + } + + } +- ++ + $handler::setCond('settings_linked_accounts', FALSE); +- ++ + $handler::setCond('owner', $is_owner); + $handler::setCond('error', $is_error); + $handler::setCond('changed', $is_changed); + $handler::setCond('captcha_needed', $captcha_needed); + $handler::setCond('dashboard_user', $is_dashboard_user); + $handler::setCond('email_required', $is_email_required); +- ++ + if($captcha_needed and !$handler::getVar('recaptcha_html')) { + $handler::setVar('recaptcha_html', CHV\Render\get_recaptcha_html()); + } +- ++ + $handler::setVar('pre_doctitle', $is_dashboard_user ? _s('Settings for %s', $user['username']) : _s('Settings')); +- ++ + $handler::setVar('error', $error_message); + $handler::setVar('input_errors', $input_errors); + $handler::setVar('changed_message', $changed_message); + $handler::setVar('changed_email_message', $changed_email_message); + $handler::setVar('user', $is_dashboard_user ? $user : $logged_user); + $handler::setVar('safe_html_user', G\safe_html($handler::getVar('user'))); +- ++ + } catch(Exception $e) { + G\exception_to_error($e); + } +diff --git a/app/themes/Peafowl/views/settings.php b/app/themes/Peafowl/views/settings.php +index 7e55b74..0b7e753 100644 +--- a/app/themes/Peafowl/views/settings.php ++++ b/app/themes/Peafowl/views/settings.php +@@ -2,9 +2,9 @@ + + +
+- ++ +
+- ++ +
+

+ +- ++ +
+- ++ +
    + +
+- ++ +
"" data-action=""validate""> +- ++ + +- ++ + + +- ++ +
+
+ +@@ -132,9 +132,9 @@ + +
+
+- ++ +
+- ++ + +@@ -158,9 +158,9 @@ +
+
+
+- ++ +
+- ++ + +
+ +@@ -176,9 +176,9 @@ +
+ +
+- ++ + +- ++ + +
+ +@@ -189,7 +189,7 @@ + ]); ?> +
+ +- ++ +
+ + ((bool)(get_safe_post() ? get_safe_post()['newsletter_subscribe'] : get_user()['newsletter_subscribe'])) + ]); ?> +
+- ++ +
+ + ((bool)(get_safe_post() ? get_safe_post()['show_nsfw_listings'] : get_user()['show_nsfw_listings'])) + ]); ?> +
+- ++ +
+- ++ + +
+
+@@ -226,27 +226,27 @@ +
+
+ +- +- +- ++ +
+ +- ++ +
+- ++ + "" required> +- ++ +
+ + +- ++ + +- ++ + + +- ++ + +
+
+@@ -359,7 +359,7 @@ + +
+
+- ++ +
+ + _s('Make my profile and identity totally private'), + 'tooltip' => _s('Enable this if you want to act like an anonymous user'), + 'checked' => ((bool)(get_safe_post() ? get_safe_post()['is_private'] : get_user()['is_private'])) +- ]); ?> ++ ]); ?> +
+- ++ +
+
+ +@@ -384,12 +384,12 @@ +
+
+ +- ++ + +
+
+ +- ++ + +- ++ + $label) { +@@ -437,49 +437,49 @@ + } + } + ?> +- ++ + +- ++ + +
+ +
+ +
+- ++ +
+ +
+ +
+- ++ +
+ +
+ +
+ +- ++ +
+- ++ + +
+ + +
+ +- ++ + +
+ ""> +
+ +- ++ + +
+- ++ +
+- ++ +
+ + +",1 +4dca546d04321a610c1835010b5dad85163b65e1,https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1,"Malicious RDP server security fixes + +This commit includes fixes for a set of 21 vulnerabilities in +rdesktop when a malicious RDP server is used. + +All vulnerabilities was identified and reported by Eyal Itkin. + + * Add rdp_protocol_error function that is used in several fixes + * Refactor of process_bitmap_updates + * Fix possible integer overflow in s_check_rem() on 32bit arch + * Fix memory corruption in process_bitmap_data - CVE-2018-8794 + * Fix remote code execution in process_bitmap_data - CVE-2018-8795 + * Fix remote code execution in process_plane - CVE-2018-8797 + * Fix Denial of Service in mcs_recv_connect_response - CVE-2018-20175 + * Fix Denial of Service in mcs_parse_domain_params - CVE-2018-20175 + * Fix Denial of Service in sec_parse_crypt_info - CVE-2018-20176 + * Fix Denial of Service in sec_recv - CVE-2018-20176 + * Fix minor information leak in rdpdr_process - CVE-2018-8791 + * Fix Denial of Service in cssp_read_tsrequest - CVE-2018-8792 + * Fix remote code execution in cssp_read_tsrequest - CVE-2018-8793 + * Fix Denial of Service in process_bitmap_data - CVE-2018-8796 + * Fix minor information leak in rdpsnd_process_ping - CVE-2018-8798 + * Fix Denial of Service in process_secondary_order - CVE-2018-8799 + * Fix remote code execution in in ui_clip_handle_data - CVE-2018-8800 + * Fix major information leak in ui_clip_handle_data - CVE-2018-20174 + * Fix memory corruption in rdp_in_unistr - CVE-2018-20177 + * Fix Denial of Service in process_demand_active - CVE-2018-20178 + * Fix remote code execution in lspci_process - CVE-2018-20179 + * Fix remote code execution in rdpsnddbg_process - CVE-2018-20180 + * Fix remote code execution in seamless_process - CVE-2018-20181 + * Fix remote code execution in seamless_process_line - CVE-2018-20182","diff --git a/asn.c b/asn.c +index 26b0e9b4..1b9fea4c 100644 +--- a/asn.c ++++ b/asn.c +@@ -22,7 +22,7 @@ + + /* Parse an ASN.1 BER header */ + RD_BOOL +-ber_parse_header(STREAM s, int tagval, int *length) ++ber_parse_header(STREAM s, int tagval, uint32 *length) + { + int tag, len; + +diff --git a/bitmap.c b/bitmap.c +index 775622cc..55c768c1 100644 +--- a/bitmap.c ++++ b/bitmap.c +@@ -794,7 +794,7 @@ process_plane(uint8 * in, int width, int height, uint8 * out, int size) + replen = revcode; + collen = 0; + } +- while (collen > 0) ++ while (indexw < width && collen > 0) + { + color = CVAL(in); + *out = color; +@@ -802,7 +802,7 @@ process_plane(uint8 * in, int width, int height, uint8 * out, int size) + indexw++; + collen--; + } +- while (replen > 0) ++ while (indexw < width && replen > 0) + { + *out = color; + out += 4; +@@ -824,7 +824,7 @@ process_plane(uint8 * in, int width, int height, uint8 * out, int size) + replen = revcode; + collen = 0; + } +- while (collen > 0) ++ while (indexw < width && collen > 0) + { + x = CVAL(in); + if (x & 1) +@@ -844,7 +844,7 @@ process_plane(uint8 * in, int width, int height, uint8 * out, int size) + indexw++; + collen--; + } +- while (replen > 0) ++ while (indexw < width && replen > 0) + { + x = last_line[indexw * 4] + color; + *out = x; +diff --git a/cliprdr.c b/cliprdr.c +index 3f68213b..76eb98d0 100644 +--- a/cliprdr.c ++++ b/cliprdr.c +@@ -118,6 +118,7 @@ cliprdr_process(STREAM s) + uint16 type, status; + uint32 length, format; + uint8 *data; ++ struct stream packet = *s; + + in_uint16_le(s, type); + in_uint16_le(s, status); +@@ -127,6 +128,11 @@ cliprdr_process(STREAM s) + logger(Clipboard, Debug, ""cliprdr_process(), type=%d, status=%d, length=%d"", type, status, + length); + ++ if (!s_check_rem(s, length)) ++ { ++ rdp_protocol_error(""cliprdr_process(), consume of packet from stream would overrun"", &packet); ++ } ++ + if (status == CLIPRDR_ERROR) + { + switch (type) +diff --git a/constants.h b/constants.h +index 7dfc2e3d..63015029 100644 +--- a/constants.h ++++ b/constants.h +@@ -751,6 +751,9 @@ enum RDP_DESKTOP_ORIENTATION + #define ENC_SALTED_CHECKSUM 0x0010 + #define NO_BITMAP_COMPRESSION_HDR 0x0400 + ++/* [MS-RDPBCGR], TS_BITMAP_DATA, flags */ ++#define BITMAP_COMPRESSION 0x0001 ++ + /* orderFlags, [MS-RDPBCGR] 2.2.7.1.3 */ + #define NEGOTIATEORDERSUPPORT 0x0002 + #define ZEROBOUNDSDELTASSUPPORT 0x0008 +diff --git a/cssp.c b/cssp.c +index 33544c3b..6b2d0f70 100644 +--- a/cssp.c ++++ b/cssp.c +@@ -595,6 +595,7 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey) + STREAM s; + int length; + int tagval; ++ struct stream packet; + + s = tcp_recv(NULL, 4); + +@@ -622,6 +623,7 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey) + + // receive the remainings of message + s = tcp_recv(s, length); ++ packet = *s; + + // parse the response and into nego token + if (!ber_in_header(s, &tagval, &length) || +@@ -632,6 +634,12 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey) + if (!ber_in_header(s, &tagval, &length) || + tagval != (BER_TAG_CTXT_SPECIFIC | BER_TAG_CONSTRUCTED | 0)) + return False; ++ ++ if (!s_check_rem(s, length)) ++ { ++ rdp_protocol_error(""cssp_read_tsrequest(), consume of version from stream would overrun"", ++ &packet); ++ } + in_uint8s(s, length); + + // negoToken [1] +@@ -653,7 +661,14 @@ cssp_read_tsrequest(STREAM token, STREAM pubkey) + if (!ber_in_header(s, &tagval, &length) || tagval != BER_TAG_OCTET_STRING) + return False; + +- token->end = token->p = token->data; ++ if (!s_check_rem(s, length)) ++ { ++ rdp_protocol_error(""cssp_read_tsrequest(), consume of token from stream would overrun"", ++ &packet); ++ } ++ ++ s_realloc(token, length); ++ s_reset(token); + out_uint8p(token, s->p, length); + s_mark_end(token); + } +diff --git a/lspci.c b/lspci.c +index c4c8ce63..2d17161c 100644 +--- a/lspci.c ++++ b/lspci.c +@@ -1,7 +1,8 @@ + /* -*- c-basic-offset: 8 -*- + rdesktop: A Remote Desktop Protocol client. + Support for the Matrox ""lspci"" channel +- Copyright (C) 2005 Matrox Graphics Inc. ++ Copyright (C) 2005 Matrox Graphics Inc. ++ Copyright 2018 Henrik Andersson for Cendio AB + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -134,6 +135,12 @@ lspci_process(STREAM s) + unsigned int pkglen; + static char *rest = NULL; + char *buf; ++ struct stream packet = *s; ++ ++ if (!s_check(s)) ++ { ++ rdp_protocol_error(""lspci_process(), stream is in unstable state"", &packet); ++ } + + pkglen = s->end - s->p; + /* str_handle_lines requires null terminated strings */ +diff --git a/mcs.c b/mcs.c +index 10b73a14..0f2360e8 100644 +--- a/mcs.c ++++ b/mcs.c +@@ -45,9 +45,16 @@ mcs_out_domain_params(STREAM s, int max_channels, int max_users, int max_tokens, + static RD_BOOL + mcs_parse_domain_params(STREAM s) + { +- int length; ++ uint32 length; ++ struct stream packet = *s; + + ber_parse_header(s, MCS_TAG_DOMAIN_PARAMS, &length); ++ ++ if (!s_check_rem(s, length)) ++ { ++ rdp_protocol_error(""mcs_parse_domain_params(), consume domain params from stream would overrun"", &packet); ++ } ++ + in_uint8s(s, length); + + return s_check(s); +@@ -89,8 +96,9 @@ mcs_recv_connect_response(STREAM mcs_data) + { + UNUSED(mcs_data); + uint8 result; +- int length; ++ uint32 length; + STREAM s; ++ struct stream packet; + RD_BOOL is_fastpath; + uint8 fastpath_hdr; + +@@ -99,6 +107,8 @@ mcs_recv_connect_response(STREAM mcs_data) + + if (s == NULL) + return False; ++ ++ packet = *s; + + ber_parse_header(s, MCS_CONNECT_RESPONSE, &length); + +@@ -112,6 +122,12 @@ mcs_recv_connect_response(STREAM mcs_data) + + ber_parse_header(s, BER_TAG_INTEGER, &length); + in_uint8s(s, length); /* connect id */ ++ ++ if (!s_check_rem(s, length)) ++ { ++ rdp_protocol_error(""mcs_recv_connect_response(), consume connect id from stream would overrun"", &packet); ++ } ++ + mcs_parse_domain_params(s); + + ber_parse_header(s, BER_TAG_OCTET_STRING, &length); +diff --git a/orders.c b/orders.c +index ba9cfa1a..5e34770b 100644 +--- a/orders.c ++++ b/orders.c +@@ -1259,11 +1259,17 @@ process_secondary_order(STREAM s) + uint16 flags; + uint8 type; + uint8 *next_order; ++ struct stream packet = *s; + + in_uint16_le(s, length); + in_uint16_le(s, flags); /* used by bmpcache2 */ + in_uint8(s, type); + ++ if (!s_check_rem(s, length + 7)) ++ { ++ rdp_protocol_error(""process_secondary_order(), next order pointer would overrun stream"", &packet); ++ } ++ + next_order = s->p + (sint16) length + 7; + + switch (type) +diff --git a/proto.h b/proto.h +index 73449dde..0d6a6c98 100644 +--- a/proto.h ++++ b/proto.h +@@ -164,6 +164,7 @@ RD_BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, ch + char *directory, RD_BOOL reconnect); + void rdp_reset_state(void); + void rdp_disconnect(void); ++void rdp_protocol_error(const char *message, STREAM s); + /* rdpdr.c */ + int get_device_index(RD_NTHANDLE handle); + void convert_to_unix_filename(char *filename); +@@ -224,7 +225,7 @@ void tcp_run_ui(RD_BOOL run); + /* asn.c */ + RD_BOOL ber_in_header(STREAM s, int *tagval, int *length); + void ber_out_header(STREAM s, int tagval, int length); +-RD_BOOL ber_parse_header(STREAM s, int tagval, int *length); ++RD_BOOL ber_parse_header(STREAM s, int tagval, uint32 *length); + void ber_out_integer(STREAM s, int value); + void ber_out_sequence(STREAM s, STREAM contents); + +diff --git a/rdp.c b/rdp.c +index f98f49cb..1654e581 100644 +--- a/rdp.c ++++ b/rdp.c +@@ -285,6 +285,19 @@ rdp_in_unistr(STREAM s, int in_len, char **string, uint32 * str_size) + size_t ibl, obl; + char *pin, *pout; + ++ struct stream packet = *s; ++ ++ if ((in_len < 0) || ((uint32)in_len >= (RD_UINT32_MAX / 2))) ++ { ++ logger(Protocol, Error, ""rdp_in_unistr(), length of unicode data is out of bounds.""); ++ abort(); ++ } ++ ++ if (!s_check_rem(s, in_len)) ++ { ++ rdp_protocol_error(""rdp_in_unistr(), consume of unicode data from stream would overrun"", &packet); ++ } ++ + // if not already open + if (!icv_utf16_to_local) + { +@@ -1211,6 +1224,7 @@ process_demand_active(STREAM s) + { + uint8 type; + uint16 len_src_descriptor, len_combined_caps; ++ struct stream packet = *s; + + /* at this point we need to ensure that we have ui created */ + rd_create_ui(); +@@ -1218,6 +1232,11 @@ process_demand_active(STREAM s) + in_uint32_le(s, g_rdp_shareid); + in_uint16_le(s, len_src_descriptor); + in_uint16_le(s, len_combined_caps); ++ ++ if (!s_check_rem(s, len_src_descriptor)) ++ { ++ rdp_protocol_error(""rdp_demand_active(), consume of source descriptor from stream would overrun"", &packet); ++ } + in_uint8s(s, len_src_descriptor); + + logger(Protocol, Debug, ""process_demand_active(), shareid=0x%x"", g_rdp_shareid); +@@ -1390,78 +1409,113 @@ process_pointer_pdu(STREAM s) + } + } + +-/* Process bitmap updates */ +-void +-process_bitmap_updates(STREAM s) ++/* Process TS_BITMAP_DATA */ ++static void ++process_bitmap_data(STREAM s) + { +- uint16 num_updates; + uint16 left, top, right, bottom, width, height; +- uint16 cx, cy, bpp, Bpp, compress, bufsize, size; ++ uint16 cx, cy, bpp, Bpp, flags, bufsize, size; + uint8 *data, *bmpdata; +- int i; +- ++ + logger(Protocol, Debug, ""%s()"", __func__); + +- in_uint16_le(s, num_updates); ++ struct stream packet = *s; + +- for (i = 0; i < num_updates; i++) +- { +- in_uint16_le(s, left); +- in_uint16_le(s, top); +- in_uint16_le(s, right); +- in_uint16_le(s, bottom); +- in_uint16_le(s, width); +- in_uint16_le(s, height); +- in_uint16_le(s, bpp); +- Bpp = (bpp + 7) / 8; +- in_uint16_le(s, compress); +- in_uint16_le(s, bufsize); +- +- cx = right - left + 1; +- cy = bottom - top + 1; +- +- logger(Graphics, Debug, +- ""process_bitmap_updates(), [%d,%d,%d,%d], [%d,%d], bpp=%d, compression=%d"", +- left, top, right, bottom, width, height, Bpp, compress); +- +- if (!compress) +- { +- int y; +- bmpdata = (uint8 *) xmalloc(width * height * Bpp); +- for (y = 0; y < height; y++) +- { +- in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)], +- width * Bpp); +- } +- ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); +- xfree(bmpdata); +- continue; +- } ++ in_uint16_le(s, left); /* destLeft */ ++ in_uint16_le(s, top); /* destTop */ ++ in_uint16_le(s, right); /* destRight */ ++ in_uint16_le(s, bottom); /* destBottom */ ++ in_uint16_le(s, width); /* width */ ++ in_uint16_le(s, height); /* height */ ++ in_uint16_le(s, bpp); /*bitsPerPixel */ ++ Bpp = (bpp + 7) / 8; ++ in_uint16_le(s, flags); /* flags */ ++ in_uint16_le(s, bufsize); /* bitmapLength */ + ++ cx = right - left + 1; ++ cy = bottom - top + 1; + +- if (compress & 0x400) +- { +- size = bufsize; +- } +- else +- { +- in_uint8s(s, 2); /* pad */ +- in_uint16_le(s, size); +- in_uint8s(s, 4); /* line_size, final_size */ +- } +- in_uint8p(s, data, size); ++ /* FIXME: There are a assumtion that we do not consider in ++ this code. The value of bpp is not passed to ++ ui_paint_bitmap() which relies on g_server_bpp for drawing ++ the bitmap data. ++ ++ Does this means that we can sanity check bpp with g_server_bpp ? ++ */ ++ ++ if (Bpp == 0 || width == 0 || height == 0) ++ { ++ logger(Protocol, Warning, ""%s(), [%d,%d,%d,%d], [%d,%d], bpp=%d, flags=%x"", __func__, ++ left, top, right, bottom, width, height, bpp, flags); ++ rdp_protocol_error(""TS_BITMAP_DATA, unsafe size of bitmap data received from server"", &packet); ++ } ++ ++ if ((RD_UINT32_MAX / Bpp) <= (width * height)) ++ { ++ logger(Protocol, Warning, ""%s(), [%d,%d,%d,%d], [%d,%d], bpp=%d, flags=%x"", __func__, ++ left, top, right, bottom, width, height, bpp, flags); ++ rdp_protocol_error(""TS_BITMAP_DATA, unsafe size of bitmap data received from server"", &packet); ++ } ++ ++ if (flags == 0) ++ { ++ /* read uncompressed bitmap data */ ++ int y; + bmpdata = (uint8 *) xmalloc(width * height * Bpp); +- if (bitmap_decompress(bmpdata, width, height, data, size, Bpp)) ++ for (y = 0; y < height; y++) + { +- ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); ++ in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)], width * Bpp); + } +- else +- { +- logger(Graphics, Warning, +- ""process_bitmap_updates(), failed to decompress bitmap""); +- } +- ++ ++ ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); + xfree(bmpdata); ++ return; ++ } ++ ++ if (flags & NO_BITMAP_COMPRESSION_HDR) ++ { ++ size = bufsize; ++ } ++ else ++ { ++ /* Read TS_CD_HEADER */ ++ in_uint8s(s, 2); /* skip cbCompFirstRowSize (must be 0x0000) */ ++ in_uint16_le(s, size); /* cbCompMainBodySize */ ++ in_uint8s(s, 2); /* skip cbScanWidth */ ++ in_uint8s(s, 2); /* skip cbUncompressedSize */ ++ } ++ ++ /* read compressed bitmap data */ ++ if (!s_check_rem(s, size)) ++ { ++ rdp_protocol_error(""process_bitmap_data(), consume of bitmap data from stream would overrun"", &packet); ++ } ++ in_uint8p(s, data, size); ++ bmpdata = (uint8 *) xmalloc(width * height * Bpp); ++ if (bitmap_decompress(bmpdata, width, height, data, size, Bpp)) ++ { ++ ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); ++ } ++ else ++ { ++ logger(Protocol, Warning, ""%s(), failed to decompress bitmap"", __func__); ++ } ++ ++ xfree(bmpdata); ++} ++ ++/* Process TS_UPDATE_BITMAP_DATA */ ++void ++process_bitmap_updates(STREAM s) ++{ ++ int i; ++ uint16 num_updates; ++ ++ in_uint16_le(s, num_updates); /* rectangles */ ++ ++ for (i = 0; i < num_updates; i++) ++ { ++ process_bitmap_data(s); + } + } + +@@ -2013,3 +2067,21 @@ rdp_disconnect(void) + logger(Protocol, Debug, ""%s()"", __func__); + sec_disconnect(); + } ++ ++/* Abort rdesktop upon protocol error ++ ++ A protocol error is defined as: ++ ++ - A value is outside specified range for example; ++ bpp for a bitmap is not allowed to be greater than the ++ value 32 but is represented by a byte in protocol. ++ ++*/ ++void ++rdp_protocol_error(const char *message, STREAM s) ++{ ++ logger(Protocol, Error, ""%s(), %s"", __func__, message); ++ if (s) ++ hexdump(s->p, s_length(s)); ++ exit(0); ++} +diff --git a/rdpdr.c b/rdpdr.c +index e8f54316..0abcacd8 100644 +--- a/rdpdr.c ++++ b/rdpdr.c +@@ -854,6 +854,7 @@ rdpdr_process(STREAM s) + uint16 vmin; + uint16 component; + uint16 pakid; ++ struct stream packet = *s; + + logger(Protocol, Debug, ""rdpdr_process()""); + /* hexdump(s->p, s->end - s->p); */ +@@ -873,8 +874,18 @@ rdpdr_process(STREAM s) + /* DR_CORE_SERVER_ANNOUNCE_REQ */ + in_uint8s(s, 2); /* skip versionMajor */ + in_uint16_le(s, vmin); /* VersionMinor */ ++ + in_uint32_le(s, g_client_id); /* ClientID */ + ++ /* g_client_id is sent back to server, ++ so lets check that we actually got ++ valid data from stream to prevent ++ that we leak back data to server */ ++ if (!s_check(s)) ++ { ++ rdp_protocol_error(""rdpdr_process(), consume of g_client_id from stream did overrun"", &packet); ++ } ++ + /* The RDP client is responsibility to provide a random client id + if server version is < 12 */ + if (vmin < 0x000c) +diff --git a/rdpsnd.c b/rdpsnd.c +index 71a3bf25..40881b76 100644 +--- a/rdpsnd.c ++++ b/rdpsnd.c +@@ -269,6 +269,12 @@ rdpsnd_process_training(STREAM in) + uint16 tick; + uint16 packsize; + STREAM out; ++ struct stream packet = *in; ++ ++ if (!s_check_rem(in, 4)) ++ { ++ rdp_protocol_error(""rdpsnd_process_training(), consume of training data from stream would overrun"", &packet); ++ } + + in_uint16_le(in, tick); + in_uint16_le(in, packsize); +@@ -445,6 +451,11 @@ rdpsnddbg_process(STREAM s) + static char *rest = NULL; + char *buf; + ++ if (!s_check(s)) ++ { ++ rdp_protocol_error(""rdpsnddbg_process(), stream is in unstable state"", s); ++ } ++ + pkglen = s->end - s->p; + /* str_handle_lines requires null terminated strings */ + buf = (char *) xmalloc(pkglen + 1); +diff --git a/seamless.c b/seamless.c +index 8fde8ddd..1935074f 100644 +--- a/seamless.c ++++ b/seamless.c +@@ -168,6 +168,12 @@ seamless_process_line(const char *line, void *data) + + icon_buf[len] = strtol(byte, NULL, 16); + len++; ++ ++ if ((size_t)len >= sizeof(icon_buf)) ++ { ++ logger(Protocol, Warning, ""seamless_process_line(), icon data would overrun icon_buf""); ++ break; ++ } + } + + ui_seamless_seticon(id, tok5, width, height, chunk, icon_buf, len); +@@ -370,6 +376,12 @@ seamless_process(STREAM s) + { + unsigned int pkglen; + char *buf; ++ struct stream packet = *s; ++ ++ if (!s_check(s)) ++ { ++ rdp_protocol_error(""seamless_process(), stream is in unstable state"", &packet); ++ } + + pkglen = s->end - s->p; + /* str_handle_lines requires null terminated strings */ +diff --git a/secure.c b/secure.c +index 48d9d010..f548a4ff 100644 +--- a/secure.c ++++ b/secure.c +@@ -296,6 +296,9 @@ sec_encrypt(uint8 * data, int length) + void + sec_decrypt(uint8 * data, int length) + { ++ if (length <= 0) ++ return; ++ + if (g_sec_decrypt_use_count == 4096) + { + sec_update(g_sec_decrypt_key, g_sec_decrypt_update_key); +@@ -848,9 +851,11 @@ sec_recv(RD_BOOL * is_fastpath) + uint16 sec_flags; + uint16 channel; + STREAM s; ++ struct stream packet; + + while ((s = mcs_recv(&channel, is_fastpath, &fastpath_hdr)) != NULL) + { ++ packet = *s; + if (*is_fastpath == True) + { + /* If fastpath packet is encrypted, read data +@@ -859,6 +864,10 @@ sec_recv(RD_BOOL * is_fastpath) + fastpath_flags = (fastpath_hdr & 0xC0) >> 6; + if (fastpath_flags & FASTPATH_OUTPUT_ENCRYPTED) + { ++ if (!s_check_rem(s, 8)) { ++ rdp_protocol_error(""sec_recv(), consume fastpath signature from stream would overrun"", &packet); ++ } ++ + in_uint8s(s, 8); /* signature */ + sec_decrypt(s->p, s->end - s->p); + } +@@ -875,6 +884,10 @@ sec_recv(RD_BOOL * is_fastpath) + { + if (sec_flags & SEC_ENCRYPT) + { ++ if (!s_check_rem(s, 8)) { ++ rdp_protocol_error(""sec_recv(), consume encrypt signature from stream would overrun"", &packet); ++ } ++ + in_uint8s(s, 8); /* signature */ + sec_decrypt(s->p, s->end - s->p); + } +@@ -889,6 +902,10 @@ sec_recv(RD_BOOL * is_fastpath) + { + uint8 swapbyte; + ++ if (!s_check_rem(s, 8)) { ++ rdp_protocol_error(""sec_recv(), consume redirect signature from stream would overrun"", &packet); ++ } ++ + in_uint8s(s, 8); /* signature */ + sec_decrypt(s->p, s->end - s->p); + +diff --git a/stream.h b/stream.h +index ccc125db..a9196e5f 100644 +--- a/stream.h ++++ b/stream.h +@@ -54,7 +54,7 @@ size_t in_ansi_string(STREAM s, char *string, size_t len); + #define s_pop_layer(s,h) (s)->p = (s)->h; + #define s_mark_end(s) (s)->end = (s)->p; + #define s_check(s) ((s)->p <= (s)->end) +-#define s_check_rem(s,n) ((s)->p + n <= (s)->end) ++#define s_check_rem(s,n) (s_check(s) && (n <= (s)->end - (s)->p)) + #define s_check_end(s) ((s)->p == (s)->end) + #define s_length(s) ((s)->end - (s)->data) + #define s_left(s) ((s)->size - ((s)->p - (s)->data)) +diff --git a/types.h b/types.h +index b139b863..4556ab48 100644 +--- a/types.h ++++ b/types.h +@@ -43,6 +43,8 @@ typedef signed short sint16; + typedef unsigned int uint32; + typedef signed int sint32; + ++#define RD_UINT32_MAX (uint32)(-1) ++ + typedef void *RD_HBITMAP; + typedef void *RD_HGLYPH; + typedef void *RD_HCOLOURMAP; +",1 +fcda0fd7ca3ddaac9628d08bd1b4f4bd817afcc4,https://github.com/jenkinsci/ownership-plugin/commit/fcda0fd7ca3ddaac9628d08bd1b4f4bd817afcc4,Add badges and new changelog references to README,"diff --git a/README.md b/README.md +index c25a83c..8269dcc 100644 +--- a/README.md ++++ b/README.md +@@ -2,6 +2,9 @@ Ownership Plugin for Jenkins + ================ + + [![Join the chat at https://gitter.im/jenkinsci/ownership-plugin](https://badges.gitter.im/jenkinsci/ownership-plugin.svg)](https://gitter.im/jenkinsci/ownership-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ++[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/ownership.svg)](https://plugins.jenkins.io/ownership) ++[![GitHub release](https://img.shields.io/github/release/jenkinsci/ownership-plugin.svg?label=changelog)](https://github.com/jenkinsci/ownership-plugin/releases/latest) ++[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/ownership.svg?color=blue)](https://plugins.jenkins.io/ownership) + + This plugin provides an ownership engine for [Jenkins](https://jenkins.io/) automation server. + +@@ -53,4 +56,5 @@ The plugin also contributes extension points, which can be used by other plugins + + # Changelog + +-See [this page](CHANGELOG.md). ++See [GitHub releases](https://github.com/jenkinsci/ownership-plugin/releases) for recent releases. ++Changelog for 0.12.1 and older versions is available [here](CHANGELOG.md). +",0 +1d7fbf0874fea88ffa0704a6884a46bca093d538,https://github.com/wpeverest/everest-forms/commit/1d7fbf0874fea88ffa0704a6884a46bca093d538,Update dependency husky to v4.3.7,"diff --git a/package-lock.json b/package-lock.json +index 7b97ab51f..0f69e38bb 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -5457,12 +5457,12 @@ + } + }, + ""find-versions"": { +- ""version"": ""3.2.0"", +- ""resolved"": ""https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz"", +- ""integrity"": ""sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww=="", ++ ""version"": ""4.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz"", ++ ""integrity"": ""sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ=="", + ""dev"": true, + ""requires"": { +- ""semver-regex"": ""^2.0.0"" ++ ""semver-regex"": ""^3.1.2"" + } + }, + ""findup"": { +@@ -6615,18 +6615,18 @@ + ""dev"": true + }, + ""husky"": { +- ""version"": ""4.3.6"", +- ""resolved"": ""https://registry.npmjs.org/husky/-/husky-4.3.6.tgz"", +- ""integrity"": ""sha512-o6UjVI8xtlWRL5395iWq9LKDyp/9TE7XMOTvIpEVzW638UcGxTmV5cfel6fsk/jbZSTlvfGVJf2svFtybcIZag=="", ++ ""version"": ""4.3.7"", ++ ""resolved"": ""https://registry.npmjs.org/husky/-/husky-4.3.7.tgz"", ++ ""integrity"": ""sha512-0fQlcCDq/xypoyYSJvEuzbDPHFf8ZF9IXKJxlrnvxABTSzK1VPT2RKYQKrcgJ+YD39swgoB6sbzywUqFxUiqjw=="", + ""dev"": true, + ""requires"": { + ""chalk"": ""^4.0.0"", + ""ci-info"": ""^2.0.0"", + ""compare-versions"": ""^3.6.0"", + ""cosmiconfig"": ""^7.0.0"", +- ""find-versions"": ""^3.2.0"", ++ ""find-versions"": ""^4.0.0"", + ""opencollective-postinstall"": ""^2.0.2"", +- ""pkg-dir"": ""^4.2.0"", ++ ""pkg-dir"": ""^5.0.0"", + ""please-upgrade-node"": ""^3.2.0"", + ""slash"": ""^3.0.0"", + ""which-pm-runs"": ""^1.0.0"" +@@ -6666,12 +6666,64 @@ + ""integrity"": ""sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="", + ""dev"": true + }, ++ ""find-up"": { ++ ""version"": ""5.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz"", ++ ""integrity"": ""sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="", ++ ""dev"": true, ++ ""requires"": { ++ ""locate-path"": ""^6.0.0"", ++ ""path-exists"": ""^4.0.0"" ++ } ++ }, + ""has-flag"": { + ""version"": ""4.0.0"", + ""resolved"": ""https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"", + ""integrity"": ""sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="", + ""dev"": true + }, ++ ""locate-path"": { ++ ""version"": ""6.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz"", ++ ""integrity"": ""sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="", ++ ""dev"": true, ++ ""requires"": { ++ ""p-locate"": ""^5.0.0"" ++ } ++ }, ++ ""p-limit"": { ++ ""version"": ""3.1.0"", ++ ""resolved"": ""https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz"", ++ ""integrity"": ""sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="", ++ ""dev"": true, ++ ""requires"": { ++ ""yocto-queue"": ""^0.1.0"" ++ } ++ }, ++ ""p-locate"": { ++ ""version"": ""5.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz"", ++ ""integrity"": ""sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="", ++ ""dev"": true, ++ ""requires"": { ++ ""p-limit"": ""^3.0.2"" ++ } ++ }, ++ ""path-exists"": { ++ ""version"": ""4.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz"", ++ ""integrity"": ""sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="", ++ ""dev"": true ++ }, ++ ""pkg-dir"": { ++ ""version"": ""5.0.0"", ++ ""resolved"": ""https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz"", ++ ""integrity"": ""sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA=="", ++ ""dev"": true, ++ ""requires"": { ++ ""find-up"": ""^5.0.0"" ++ } ++ }, + ""supports-color"": { + ""version"": ""7.2.0"", + ""resolved"": ""https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"", +@@ -9595,9 +9647,9 @@ + ""dev"": true + }, + ""semver-regex"": { +- ""version"": ""2.0.0"", +- ""resolved"": ""https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz"", +- ""integrity"": ""sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw=="", ++ ""version"": ""3.1.2"", ++ ""resolved"": ""https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.2.tgz"", ++ ""integrity"": ""sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA=="", + ""dev"": true + }, + ""serialize-javascript"": { +diff --git a/package.json b/package.json +index 0f3276989..bd8590d48 100644 +--- a/package.json ++++ b/package.json +@@ -41,7 +41,7 @@ + ""grunt-rtlcss"": ""2.0.2"", + ""grunt-sass"": ""3.1.0"", + ""grunt-stylelint"": ""0.16.0"", +- ""husky"": ""4.3.6"", ++ ""husky"": ""4.3.7"", + ""lint-staged"": ""10.5.3"", + ""node-sass"": ""5.0.0"", + ""stylelint"": ""13.8.0"", +",0 +86326e880d31b328a151d45348c35220baa9a1ff,https://github.com/the-tcpdump-group/tcpdump/commit/86326e880d31b328a151d45348c35220baa9a1ff,"(for 4.9.3) CVE-2018-14881/BGP: Fix BGP_CAPCODE_RESTART. + +Add a bounds check and a comment to bgp_capabilities_print(). + +This fixes a buffer over-read discovered by Bhargava Shastry, +SecT/TU Berlin. + +Add a test using the capture file supplied by the reporter(s).","diff --git a/print-bgp.c b/print-bgp.c +index c82f1cc7d..1438915a4 100644 +--- a/print-bgp.c ++++ b/print-bgp.c +@@ -2351,6 +2351,8 @@ bgp_capabilities_print(netdissect_options *ndo, + opt[i+5])); + break; + case BGP_CAPCODE_RESTART: ++ /* Restart Flags (4 bits), Restart Time in seconds (12 bits) */ ++ ND_TCHECK_16BITS(opt + i + 2); + ND_PRINT((ndo, ""\n\t\tRestart Flags: [%s], Restart Time %us"", + ((opt[i+2])&0x80) ? ""R"" : ""none"", + EXTRACT_16BITS(opt+i+2)&0xfff)); +diff --git a/tests/TESTLIST b/tests/TESTLIST +index 8cc638ddb..b77c01c8f 100644 +--- a/tests/TESTLIST ++++ b/tests/TESTLIST +@@ -557,6 +557,7 @@ icmp-icmp_print-oobr-1 icmp-icmp_print-oobr-1.pcap icmp-icmp_print-oobr-1.out -v + icmp-icmp_print-oobr-2 icmp-icmp_print-oobr-2.pcap icmp-icmp_print-oobr-2.out -v -c3 + rsvp-rsvp_obj_print-oobr rsvp-rsvp_obj_print-oobr.pcap rsvp-rsvp_obj_print-oobr.out -v -c3 + vrrp-vrrp_print-oobr vrrp-vrrp_print-oobr.pcap vrrp-vrrp_print-oobr.out -v -c3 ++bgp-bgp_capabilities_print-oobr-1 bgp-bgp_capabilities_print-oobr-1.pcap bgp-bgp_capabilities_print-oobr-1.out -v -c1 + # The .pcap file is truncated after the 1st packet. + hncp_dhcpv6data-oobr hncp_dhcpv6data-oobr.pcap hncp_dhcpv6data-oobr.out -v -c1 + hncp_dhcpv4data-oobr hncp_dhcpv4data-oobr.pcap hncp_dhcpv4data-oobr.out -v -c1 +diff --git a/tests/bgp-bgp_capabilities_print-oobr-1.out b/tests/bgp-bgp_capabilities_print-oobr-1.out +new file mode 100644 +index 000000000..48cd19d66 +--- /dev/null ++++ b/tests/bgp-bgp_capabilities_print-oobr-1.out +@@ -0,0 +1,27 @@ ++IP (tos 0x1f,CE, ttl 254, id 38671, offset 0, flags [+, DF, rsvd], proto TCP (6), length 4135, bad cksum 200 (->1fdd)!) ++ 226.219.0.0.179 > 16.233.34.0.100: Flags [SPUE], seq 347537408:347541483, win 511, urg 65535, options [eol], length 4075: BGP [|BGP] ++ Open Message (1), length: 59 ++ Version 255, my AS 65528, Holdtime 4324s, ID 144.8.32.4 ++ Optional parameters, length: 29 ++ Option Unknown (0), length: 0 ++ no decoder for option 0 ++ Option Capabilities Advertisement (2), length: 8 ++ Graceful Restart (64), length: 0 ++ Restart Flags: [none], Restart Time 0s ++ Unknown (0), length: 0 ++ no decoder for Capability 0 ++ 32-Bit AS Number (65), length: 4 ++ 4 Byte AS 2 ++ Option Unknown (0), length: 2 ++ no decoder for option 0 ++ Option Capabilities Advertisement (2), length: 2 ++ Unknown (232), length: 3 ++ no decoder for Capability 232 ++ 0x0000: 0207 04 ++ Option Capabilities Advertisement (2), length: 7 ++ Multiple Routes to a Destination (4), length: 0 ++ no decoder for Capability 4 ++ Unknown (8), length: 0 ++ no decoder for Capability 8 ++ Route Refresh (Cisco) (128), length: 0 ++ Graceful Restart (64), length: 0[|BGP] +diff --git a/tests/bgp-bgp_capabilities_print-oobr-1.pcap b/tests/bgp-bgp_capabilities_print-oobr-1.pcap +new file mode 100644 +index 000000000..61a5351b2 +Binary files /dev/null and b/tests/bgp-bgp_capabilities_print-oobr-1.pcap differ +",1 +c4bb5dff73953236064d4774416750e8af06ea38,https://github.com/Dieterbe/uzbl/commit/c4bb5dff73953236064d4774416750e8af06ea38,"Merge pull request #338 from GSI/gsi-statusbar-colors + +defined contrast-rich colors for the status bar","diff --git a/examples/config/README.md b/examples/config/README.md +new file mode 100644 +index 000000000..6b2f3d8fb +--- /dev/null ++++ b/examples/config/README.md +@@ -0,0 +1,12 @@ ++In order to configure the background color of selected text in the uzbl ++UI status bar, add this into your ++**\$XDG\_CONFIG\_HOME/gtk-3.0/gtk.css** ++ ++ #Uzbl label selection { ++ background-color: #fdf6e3; ++ } ++ ++The according CSS selectors can be found via the GTK inspector ++(`GTK_DEBUG=interactive uzbl-browser`). ++ ++See https://github.com/uzbl/uzbl/pull/338 for further discussion. +diff --git a/examples/config/config b/examples/config/config +index b6c600a90..d8d83930d 100644 +--- a/examples/config/config ++++ b/examples/config/config +@@ -62,12 +62,12 @@ set download_handler spawn_sync @scripts_dir/download.sh + @on_event REQ_NEW_WINDOW event @- if (@embedded) ""NEW_TAB""; else ""NEW_WINDOW"" -@ %s + + # Load start handler +-@on_event LOAD_START @set_status wait ++@on_event LOAD_START @set_status wait + # Reset the keycmd on navigation + @on_event LOAD_START @set_mode + + # Load commit handlers +-@on_event LOAD_COMMIT @set_status recv ++@on_event LOAD_COMMIT @set_status recv + + # add some javascript to the page for other 'js' commands to access later. + @on_event LOAD_COMMIT js page string 'uzbl = {}' +@@ -80,7 +80,7 @@ set download_handler spawn_sync @scripts_dir/download.sh + #@on_event LOAD_COMMIT spawn @scripts_dir/per-site-settings.py @data_home/per-site-settings + + # Load finish handlers +-@on_event LOAD_FINISH @set_status done ++@on_event LOAD_FINISH @set_status done + @on_event LOAD_FINISH spawn @scripts_dir/history.sh + + # Switch to insert mode if a (editable) html form is clicked +@@ -112,30 +112,30 @@ set forward_keys 0 + + set show_status 1 + set status_top 0 +-set status_background #303030 ++set status_background #dc322f + +-set modcmd_style weight=""bold"" foreground=""red"" +-set keycmd_style weight=""light"" foreground=""red"" ++set modcmd_style weight=""bold"" foreground=""#dc322f"" ++set keycmd_style weight=""light"" foreground=""#dc322f"" + set prompt_style foreground=""grey"" + set cursor_style underline=""single"" +-set completion_style foreground=""green"" ++set completion_style foreground=""#eee8d5"" + set hint_style weight=""bold"" + +-set mode_section [\@[\@mode_indicator]\@] +-set keycmd_section [\@[\@keycmd_prompt]\@\@modcmd\@keycmd\@completion_list] +-set progress_section \@[\@progress.output]\@ +-set scroll_section \@[\@scroll_message]\@ +-set uri_section \@"">\@[\@uri]\@ +-set name_section \@[\@NAME]\@ +-set status_section \@status_message +-set selected_section \@[\@SELECTED_URI]\@ ++set mode_section [\@[\@mode_indicator]\@] ++set keycmd_section \@[\@keycmd_prompt]\@\@modcmd\@keycmd\@completion_list ++set progress_section \@[\@progress.output]\@ ++set scroll_section \@[\@scroll_message]\@ ++set uri_section \@"">\@[\@uri]\@ + +-set download_section \@downloads +-set proxy_section \@[\@proxy_url]\@ ++set name_section <\@[\@NAME]\@> ++set status_section \@status_message ++set selected_section \@[\@SELECTED_URI]\@ + +-set status_format @mode_section @keycmd_section @progress_section @name_section @status_section @scroll_section @selected_section @download_section +-set status_format_right uri: @uri_section +-set status_format_right proxy: @proxy_section uri: @uri_section ++set download_section \@downloads ++set proxy_section \@[\@proxy_url]\@ ++ ++set status_format @mode_section @indicator_section @keycmd_section @progress_section @status_section @name_section @scroll_section @selected_section @download_section ++set status_format_right proxy: @proxy_section uri: @uri_section + + set title_format_long \@keycmd_prompt \@raw_modcmd \@raw_keycmd \@TITLE - Uzbl browser <\@NAME> \@SELECTED_URI + +@@ -497,23 +497,23 @@ set insert @mode_config insert + set stack @mode_config stack + + # Command mode config. +-@command keycmd_style foreground=""red"" +-@command status_background #202020 ++@command keycmd_style foreground=""#dc322f"" ++@command status_background #002b36 + @command mode_indicator Cmd + @command keycmd_events 1 + @command forward_keys 0 + @command modcmd_updates 1 + + # Insert mode config. +-@insert status_background #303030 ++@insert status_background #eee8d5 + @insert mode_indicator Ins + @insert forward_keys 1 + @insert keycmd_events 0 + @insert modcmd_updates 0 + + # Multi-stage-binding mode config. +-@stack keycmd_style foreground=""red"" +-@stack status_background #202020 ++@stack keycmd_style foreground=""#dc322f"" ++@stack status_background #400040 + @stack mode_indicator Bnd + @stack prompt_style foreground=""#888"" weight=""light"" + @stack keycmd_events 1 +",0 +c63c74980dfcd0cbcb8bd5b04071348abf458c64,https://github.com/robo-code/robocode/commit/c63c74980dfcd0cbcb8bd5b04071348abf458c64,The TestWin unit test seems unstable. Hence it is being set to ignored for now.,"diff --git a/robocode.tests/src/test/java/net/sf/robocode/test/robots/TestWin.java b/robocode.tests/src/test/java/net/sf/robocode/test/robots/TestWin.java +index 4d5dc9cb0..136699d15 100644 +--- a/robocode.tests/src/test/java/net/sf/robocode/test/robots/TestWin.java ++++ b/robocode.tests/src/test/java/net/sf/robocode/test/robots/TestWin.java +@@ -11,6 +11,7 @@ + import net.sf.robocode.test.helpers.RobocodeTestBed; + import static org.hamcrest.CoreMatchers.is; + import org.junit.Assert; ++import org.junit.Ignore; + import org.junit.Test; + import robocode.BattleResults; + import robocode.control.events.BattleCompletedEvent; +@@ -22,6 +23,7 @@ + * @author Pavel Savara (original) + * @author Flemming N. Larsen (contributor) + */ ++@Ignore + public class TestWin extends RobocodeTestBed { + private BattleResults[] results; + private StringBuffer outputBuf = new StringBuffer(); +",0 +95464495f1e3e714d5c295fe621af5d2e0d4238d,https://github.com/fatfreecrm/fat_free_crm/commit/95464495f1e3e714d5c295fe621af5d2e0d4238d,json_escape user input,"diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml +index 2625a92c54..1b8d8c0384 100755 +--- a/app/views/layouts/application.html.haml ++++ b/app/views/layouts/application.html.haml +@@ -27,7 +27,7 @@ + :javascript + #{yield :javascript} + var _ffcrm_users = [ +- #{User.all.map{|u| ""\""#{u.full_name} (@#{u.username})\"""" }.join("",\n"")} ++ #{User.all.map{|u| ""\""#{j u.full_name} (@#{j u.username})\"""" }.join("",\n"")} + ]; + + +",1 +6f5ba2b651cd9d4b7fa8ee5c4f94460645877c45,https://github.com/the-tcpdump-group/tcpdump/commit/6f5ba2b651cd9d4b7fa8ee5c4f94460645877c45,"CVE-2017-12893/SMB/CIFS: Add a bounds check in name_len(). + +After we advance the pointer by the length value in the buffer, make +sure it points to something in the captured data. + +This fixes a buffer over-read discovered by Forcepoint's security +researchers Otto Airamo & Antti Levomäki. + +Add a test using the capture file supplied by the reporter(s).","diff --git a/smbutil.c b/smbutil.c +index b38d73afb..fc9b3cc6f 100644 +--- a/smbutil.c ++++ b/smbutil.c +@@ -237,6 +237,7 @@ name_len(netdissect_options *ndo, + return(-1); /* name goes past the end of the buffer */ + ND_TCHECK2(*s, 1); + s += (*s) + 1; ++ ND_TCHECK2(*s, 1); + } + return(PTR_DIFF(s, s0) + 1); + +diff --git a/tests/TESTLIST b/tests/TESTLIST +index 5e3ea8d51..514076410 100644 +--- a/tests/TESTLIST ++++ b/tests/TESTLIST +@@ -449,6 +449,9 @@ decnet-oobr decnet-oobr.pcap decnet-oobr.out + # bad packets from Wilfried Kirsch + slip-bad-direction slip-bad-direction.pcap slip-bad-direction.out -ve + ++# bad packets from Otto Airamo and Antti Levomäki ++nbns-valgrind nbns-valgrind.pcap nbns-valgrind.out -vvv -e ++ + # RTP tests + # fuzzed pcap + rtp-seg-fault-1 rtp-seg-fault-1.pcap rtp-seg-fault-1.out -v -T rtp +diff --git a/tests/nbns-valgrind.out b/tests/nbns-valgrind.out +new file mode 100644 +index 000000000..bb9cc4973 +--- /dev/null ++++ b/tests/nbns-valgrind.out +@@ -0,0 +1,16 @@ ++00:0c:85:0e:a5:ff > 00:00:0c:07:ac:f0, ethertype IPv4 (0x0800), length 92: (tos 0x0, ttl 127, id 38615, offset 0, flags [none], proto UDP (17), length 78) ++ 10.49.248.228.137 > 10.48.161.241.137: ++>>> NBT UDP PACKET(137): QUERY; REQUEST; UNICAST ++TrnID=0x8D40 ++OpCode=0 ++NmFlags=0x10 ++Rcode=0 ++QueryCount=1 ++AnswerCount=0 ++AuthorityCount=0 ++AddressRecCount=0 ++QuestionRecords: ++Name= ++WARNING: Short packet. Try increasing the snap length ++ ++ +diff --git a/tests/nbns-valgrind.pcap b/tests/nbns-valgrind.pcap +new file mode 100644 +index 000000000..57657f02b +Binary files /dev/null and b/tests/nbns-valgrind.pcap differ +",1 +4c023ba43c16396f0d199e2df1cfa59b88b62acc,https://github.com/krb5/krb5/commit/4c023ba43c16396f0d199e2df1cfa59b88b62acc,"KDC null deref due to referrals [CVE-2013-1417] + +An authenticated remote client can cause a KDC to crash by making a +valid TGS-REQ to a KDC serving a realm with a single-component name. +The process_tgs_req() function dereferences a null pointer because an +unusual failure condition causes a helper function to return success. + +While attempting to provide cross-realm referrals for host-based +service principals, the find_referral_tgs() function could return a +TGS principal for a zero-length realm name (indicating that the +hostname in the service principal has no known realm associated with +it). + +Subsequently, the find_alternate_tgs() function would attempt to +construct a path to this empty-string realm, and return success along +with a null pointer in its output parameter. This happens because +krb5_walk_realm_tree() returns a list of length one when it attempts +to construct a transit path between a single-component realm and the +empty-string realm. This list causes a loop in find_alternate_tgs() +to iterate over zero elements, resulting in the unexpected output of a +null pointer, which process_tgs_req() proceeds to dereference because +there is no error condition. + +Add an error condition to find_referral_tgs() when +krb5_get_host_realm() returns an empty realm name. Also add an error +condition to find_alternate_tgs() to handle the length-one output from +krb5_walk_realm_tree(). + +The vulnerable configuration is not likely to arise in practice. +(Realm names that have a single component are likely to be test +realms.) Releases prior to krb5-1.11 are not vulnerable. + +Thanks to Sol Jerome for reporting this problem. + +CVSSv2: AV:N/AC:M/Au:S/C:N/I:N/A:P/E:H/RL:O/RC:C + +(cherry picked from commit 3c7f1c21ffaaf6c90f1045f0f5440303c766acc0) + +ticket: 7668 +version_fixed: 1.11.4 +status: resolved","diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c +index d41bc5d4eed..745a48e9844 100644 +--- a/src/kdc/do_tgs_req.c ++++ b/src/kdc/do_tgs_req.c +@@ -1057,6 +1057,8 @@ find_alternate_tgs(kdc_realm_t *kdc_active_realm, krb5_principal princ, + goto cleanup; + } + cleanup: ++ if (retval == 0 && server_ptr == NULL) ++ retval = KRB5_KDB_NOENTRY; + if (retval != 0) + *status = ""UNKNOWN_SERVER""; + +@@ -1149,7 +1151,7 @@ find_referral_tgs(kdc_realm_t *kdc_active_realm, krb5_kdc_req *request, + goto cleanup; + } + /* Don't return a referral to the empty realm or the service realm. */ +- if (realms == NULL || realms[0] == '\0' || ++ if (realms == NULL || realms[0] == NULL || *realms[0] == '\0' || + data_eq_string(srealm, realms[0])) { + retval = KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN; + goto cleanup; +",1 +bca0f28b62c624c3450c35ea98a4f7fc87e0b1fe,https://github.com/silverstripe/sapphire/commit/bca0f28b62c624c3450c35ea98a4f7fc87e0b1fe,FIX: Make template parser error on mismatched brackets (fixes #8845),"diff --git a/src/View/SSTemplateParser.peg b/src/View/SSTemplateParser.peg +index 9747781c535..ab5828ad9d8 100644 +--- a/src/View/SSTemplateParser.peg ++++ b/src/View/SSTemplateParser.peg +@@ -216,7 +216,7 @@ class SSTemplateParser extends Parser implements TemplateParser + # Any new template elements need to be included in this list, if they are to work. + + Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | +- OpenBlock | MalformedBlock | Injection | Text)+ ++ OpenBlock | MalformedBlock | MalformedBracketInjection | Injection | Text)+ + */ + function Template_STR(&$res, $sub) + { +@@ -367,6 +367,18 @@ class SSTemplateParser extends Parser implements TemplateParser + $res['php'] .= ']'; + } + ++ /*!* ++ ++ # This is used to detect a malformed bracket injection - where the closing '}' is missing ++ ++ MalformedBracketInjection: ""{$"" :Lookup !( ""}"" ) ++ */ ++ function MalformedBracketInjection__finalise(&$res) ++ { ++ $lookup = $res['text']; ++ throw new SSTemplateParseException(""Malformed bracket injection $lookup. Perhaps you have forgotten the "" . ++ ""closing bracket (})?"", $this); ++ } + + /*!* + +diff --git a/src/View/SSTemplateParser.php b/src/View/SSTemplateParser.php +index f5401e28f35..6f08dbbb46b 100644 +--- a/src/View/SSTemplateParser.php ++++ b/src/View/SSTemplateParser.php +@@ -189,17 +189,17 @@ protected function validateExtensionBlock($name, $callable, $type) + } + + /* Template: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | +- OpenBlock | MalformedBlock | Injection | Text)+ */ ++ OpenBlock | MalformedBlock | MalformedBracketInjection | Injection | Text)+ */ + protected $match_Template_typestack = array('Template'); + function match_Template ($stack = array()) { + $matchrule = ""Template""; $result = $this->construct($matchrule, $matchrule, null); + $count = 0; + while (true) { +- $res_50 = $result; +- $pos_50 = $this->pos; +- $_49 = NULL; ++ $res_54 = $result; ++ $pos_54 = $this->pos; ++ $_53 = NULL; + do { +- $_47 = NULL; ++ $_51 = NULL; + do { + $res_0 = $result; + $pos_0 = $this->pos; +@@ -207,11 +207,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_47 = TRUE; break; ++ $_51 = TRUE; break; + } + $result = $res_0; + $this->pos = $pos_0; +- $_45 = NULL; ++ $_49 = NULL; + do { + $res_2 = $result; + $pos_2 = $this->pos; +@@ -219,11 +219,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_45 = TRUE; break; ++ $_49 = TRUE; break; + } + $result = $res_2; + $this->pos = $pos_2; +- $_43 = NULL; ++ $_47 = NULL; + do { + $res_4 = $result; + $pos_4 = $this->pos; +@@ -231,11 +231,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_43 = TRUE; break; ++ $_47 = TRUE; break; + } + $result = $res_4; + $this->pos = $pos_4; +- $_41 = NULL; ++ $_45 = NULL; + do { + $res_6 = $result; + $pos_6 = $this->pos; +@@ -243,11 +243,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_41 = TRUE; break; ++ $_45 = TRUE; break; + } + $result = $res_6; + $this->pos = $pos_6; +- $_39 = NULL; ++ $_43 = NULL; + do { + $res_8 = $result; + $pos_8 = $this->pos; +@@ -255,11 +255,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_39 = TRUE; break; ++ $_43 = TRUE; break; + } + $result = $res_8; + $this->pos = $pos_8; +- $_37 = NULL; ++ $_41 = NULL; + do { + $res_10 = $result; + $pos_10 = $this->pos; +@@ -267,11 +267,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_37 = TRUE; break; ++ $_41 = TRUE; break; + } + $result = $res_10; + $this->pos = $pos_10; +- $_35 = NULL; ++ $_39 = NULL; + do { + $res_12 = $result; + $pos_12 = $this->pos; +@@ -279,11 +279,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_35 = TRUE; break; ++ $_39 = TRUE; break; + } + $result = $res_12; + $this->pos = $pos_12; +- $_33 = NULL; ++ $_37 = NULL; + do { + $res_14 = $result; + $pos_14 = $this->pos; +@@ -291,11 +291,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_33 = TRUE; break; ++ $_37 = TRUE; break; + } + $result = $res_14; + $this->pos = $pos_14; +- $_31 = NULL; ++ $_35 = NULL; + do { + $res_16 = $result; + $pos_16 = $this->pos; +@@ -303,11 +303,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_31 = TRUE; break; ++ $_35 = TRUE; break; + } + $result = $res_16; + $this->pos = $pos_16; +- $_29 = NULL; ++ $_33 = NULL; + do { + $res_18 = $result; + $pos_18 = $this->pos; +@@ -315,11 +315,11 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_29 = TRUE; break; ++ $_33 = TRUE; break; + } + $result = $res_18; + $this->pos = $pos_18; +- $_27 = NULL; ++ $_31 = NULL; + do { + $res_20 = $result; + $pos_20 = $this->pos; +@@ -327,108 +327,126 @@ function match_Template ($stack = array()) { + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_27 = TRUE; break; ++ $_31 = TRUE; break; + } + $result = $res_20; + $this->pos = $pos_20; +- $_25 = NULL; ++ $_29 = NULL; + do { + $res_22 = $result; + $pos_22 = $this->pos; +- $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $matcher = 'match_'.'MalformedBracketInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_25 = TRUE; break; ++ $_29 = TRUE; break; + } + $result = $res_22; + $this->pos = $pos_22; +- $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; +- $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); +- if ($subres !== FALSE) { +- $this->store( $result, $subres ); +- $_25 = TRUE; break; ++ $_27 = NULL; ++ do { ++ $res_24 = $result; ++ $pos_24 = $this->pos; ++ $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_27 = TRUE; break; ++ } ++ $result = $res_24; ++ $this->pos = $pos_24; ++ $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_27 = TRUE; break; ++ } ++ $result = $res_24; ++ $this->pos = $pos_24; ++ $_27 = FALSE; break; + } ++ while(0); ++ if( $_27 === TRUE ) { $_29 = TRUE; break; } + $result = $res_22; + $this->pos = $pos_22; +- $_25 = FALSE; break; ++ $_29 = FALSE; break; + } + while(0); +- if( $_25 === TRUE ) { $_27 = TRUE; break; } ++ if( $_29 === TRUE ) { $_31 = TRUE; break; } + $result = $res_20; + $this->pos = $pos_20; +- $_27 = FALSE; break; ++ $_31 = FALSE; break; + } + while(0); +- if( $_27 === TRUE ) { $_29 = TRUE; break; } ++ if( $_31 === TRUE ) { $_33 = TRUE; break; } + $result = $res_18; + $this->pos = $pos_18; +- $_29 = FALSE; break; ++ $_33 = FALSE; break; + } + while(0); +- if( $_29 === TRUE ) { $_31 = TRUE; break; } ++ if( $_33 === TRUE ) { $_35 = TRUE; break; } + $result = $res_16; + $this->pos = $pos_16; +- $_31 = FALSE; break; ++ $_35 = FALSE; break; + } + while(0); +- if( $_31 === TRUE ) { $_33 = TRUE; break; } ++ if( $_35 === TRUE ) { $_37 = TRUE; break; } + $result = $res_14; + $this->pos = $pos_14; +- $_33 = FALSE; break; ++ $_37 = FALSE; break; + } + while(0); +- if( $_33 === TRUE ) { $_35 = TRUE; break; } ++ if( $_37 === TRUE ) { $_39 = TRUE; break; } + $result = $res_12; + $this->pos = $pos_12; +- $_35 = FALSE; break; ++ $_39 = FALSE; break; + } + while(0); +- if( $_35 === TRUE ) { $_37 = TRUE; break; } ++ if( $_39 === TRUE ) { $_41 = TRUE; break; } + $result = $res_10; + $this->pos = $pos_10; +- $_37 = FALSE; break; ++ $_41 = FALSE; break; + } + while(0); +- if( $_37 === TRUE ) { $_39 = TRUE; break; } ++ if( $_41 === TRUE ) { $_43 = TRUE; break; } + $result = $res_8; + $this->pos = $pos_8; +- $_39 = FALSE; break; ++ $_43 = FALSE; break; + } + while(0); +- if( $_39 === TRUE ) { $_41 = TRUE; break; } ++ if( $_43 === TRUE ) { $_45 = TRUE; break; } + $result = $res_6; + $this->pos = $pos_6; +- $_41 = FALSE; break; ++ $_45 = FALSE; break; + } + while(0); +- if( $_41 === TRUE ) { $_43 = TRUE; break; } ++ if( $_45 === TRUE ) { $_47 = TRUE; break; } + $result = $res_4; + $this->pos = $pos_4; +- $_43 = FALSE; break; ++ $_47 = FALSE; break; + } + while(0); +- if( $_43 === TRUE ) { $_45 = TRUE; break; } ++ if( $_47 === TRUE ) { $_49 = TRUE; break; } + $result = $res_2; + $this->pos = $pos_2; +- $_45 = FALSE; break; ++ $_49 = FALSE; break; + } + while(0); +- if( $_45 === TRUE ) { $_47 = TRUE; break; } ++ if( $_49 === TRUE ) { $_51 = TRUE; break; } + $result = $res_0; + $this->pos = $pos_0; +- $_47 = FALSE; break; ++ $_51 = FALSE; break; + } + while(0); +- if( $_47 === FALSE) { $_49 = FALSE; break; } +- $_49 = TRUE; break; ++ if( $_51 === FALSE) { $_53 = FALSE; break; } ++ $_53 = TRUE; break; + } + while(0); +- if( $_49 === FALSE) { +- $result = $res_50; +- $this->pos = $pos_50; +- unset( $res_50 ); +- unset( $pos_50 ); ++ if( $_53 === FALSE) { ++ $result = $res_54; ++ $this->pos = $pos_54; ++ unset( $res_54 ); ++ unset( $pos_54 ); + break; + } + $count += 1; +@@ -496,48 +514,48 @@ function match_Value ($stack = array()) { + protected $match_CallArguments_typestack = array('CallArguments'); + function match_CallArguments ($stack = array()) { + $matchrule = ""CallArguments""; $result = $this->construct($matchrule, $matchrule, null); +- $_62 = NULL; ++ $_66 = NULL; + do { + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Argument"" ); + } +- else { $_62 = FALSE; break; } ++ else { $_66 = FALSE; break; } + while (true) { +- $res_61 = $result; +- $pos_61 = $this->pos; +- $_60 = NULL; ++ $res_65 = $result; ++ $pos_65 = $this->pos; ++ $_64 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_60 = FALSE; break; } ++ else { $_64 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Argument"" ); + } +- else { $_60 = FALSE; break; } +- $_60 = TRUE; break; ++ else { $_64 = FALSE; break; } ++ $_64 = TRUE; break; + } + while(0); +- if( $_60 === FALSE) { +- $result = $res_61; +- $this->pos = $pos_61; +- unset( $res_61 ); +- unset( $pos_61 ); ++ if( $_64 === FALSE) { ++ $result = $res_65; ++ $this->pos = $pos_65; ++ unset( $res_65 ); ++ unset( $pos_65 ); + break; + } + } +- $_62 = TRUE; break; ++ $_66 = TRUE; break; + } + while(0); +- if( $_62 === TRUE ) { return $this->finalise($result); } +- if( $_62 === FALSE) { return FALSE; } ++ if( $_66 === TRUE ) { return $this->finalise($result); } ++ if( $_66 === FALSE) { return FALSE; } + } + + +@@ -561,57 +579,57 @@ function CallArguments_Argument(&$res, $sub) + protected $match_Call_typestack = array('Call'); + function match_Call ($stack = array()) { + $matchrule = ""Call""; $result = $this->construct($matchrule, $matchrule, null); +- $_72 = NULL; ++ $_76 = NULL; + do { + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Method"" ); + } +- else { $_72 = FALSE; break; } +- $res_71 = $result; +- $pos_71 = $this->pos; +- $_70 = NULL; ++ else { $_76 = FALSE; break; } ++ $res_75 = $result; ++ $pos_75 = $this->pos; ++ $_74 = NULL; + do { + if (substr($this->string,$this->pos,1) == '(') { + $this->pos += 1; + $result[""text""] .= '('; + } +- else { $_70 = FALSE; break; } ++ else { $_74 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_67 = $result; +- $pos_67 = $this->pos; ++ $res_71 = $result; ++ $pos_71 = $this->pos; + $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""CallArguments"" ); + } + else { +- $result = $res_67; +- $this->pos = $pos_67; +- unset( $res_67 ); +- unset( $pos_67 ); ++ $result = $res_71; ++ $this->pos = $pos_71; ++ unset( $res_71 ); ++ unset( $pos_71 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ')') { + $this->pos += 1; + $result[""text""] .= ')'; + } +- else { $_70 = FALSE; break; } +- $_70 = TRUE; break; ++ else { $_74 = FALSE; break; } ++ $_74 = TRUE; break; + } + while(0); +- if( $_70 === FALSE) { +- $result = $res_71; +- $this->pos = $pos_71; +- unset( $res_71 ); +- unset( $pos_71 ); ++ if( $_74 === FALSE) { ++ $result = $res_75; ++ $this->pos = $pos_75; ++ unset( $res_75 ); ++ unset( $pos_75 ); + } +- $_72 = TRUE; break; ++ $_76 = TRUE; break; + } + while(0); +- if( $_72 === TRUE ) { return $this->finalise($result); } +- if( $_72 === FALSE) { return FALSE; } ++ if( $_76 === TRUE ) { return $this->finalise($result); } ++ if( $_76 === FALSE) { return FALSE; } + } + + +@@ -619,32 +637,32 @@ function match_Call ($stack = array()) { + protected $match_LookupStep_typestack = array('LookupStep'); + function match_LookupStep ($stack = array()) { + $matchrule = ""LookupStep""; $result = $this->construct($matchrule, $matchrule, null); +- $_76 = NULL; ++ $_80 = NULL; + do { + $matcher = 'match_'.'Call'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Call"" ); + } +- else { $_76 = FALSE; break; } +- $res_75 = $result; +- $pos_75 = $this->pos; ++ else { $_80 = FALSE; break; } ++ $res_79 = $result; ++ $pos_79 = $this->pos; + if (substr($this->string,$this->pos,1) == '.') { + $this->pos += 1; + $result[""text""] .= '.'; +- $result = $res_75; +- $this->pos = $pos_75; ++ $result = $res_79; ++ $this->pos = $pos_79; + } + else { +- $result = $res_75; +- $this->pos = $pos_75; +- $_76 = FALSE; break; ++ $result = $res_79; ++ $this->pos = $pos_79; ++ $_80 = FALSE; break; + } +- $_76 = TRUE; break; ++ $_80 = TRUE; break; + } + while(0); +- if( $_76 === TRUE ) { return $this->finalise($result); } +- if( $_76 === FALSE) { return FALSE; } ++ if( $_80 === TRUE ) { return $this->finalise($result); } ++ if( $_80 === FALSE) { return FALSE; } + } + + +@@ -666,42 +684,42 @@ function match_LastLookupStep ($stack = array()) { + protected $match_Lookup_typestack = array('Lookup'); + function match_Lookup ($stack = array()) { + $matchrule = ""Lookup""; $result = $this->construct($matchrule, $matchrule, null); +- $_90 = NULL; ++ $_94 = NULL; + do { +- $res_79 = $result; +- $pos_79 = $this->pos; +- $_87 = NULL; ++ $res_83 = $result; ++ $pos_83 = $this->pos; ++ $_91 = NULL; + do { + $matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_87 = FALSE; break; } ++ else { $_91 = FALSE; break; } + while (true) { +- $res_84 = $result; +- $pos_84 = $this->pos; +- $_83 = NULL; ++ $res_88 = $result; ++ $pos_88 = $this->pos; ++ $_87 = NULL; + do { + if (substr($this->string,$this->pos,1) == '.') { + $this->pos += 1; + $result[""text""] .= '.'; + } +- else { $_83 = FALSE; break; } ++ else { $_87 = FALSE; break; } + $matcher = 'match_'.'LookupStep'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_83 = FALSE; break; } +- $_83 = TRUE; break; ++ else { $_87 = FALSE; break; } ++ $_87 = TRUE; break; + } + while(0); +- if( $_83 === FALSE) { +- $result = $res_84; +- $this->pos = $pos_84; +- unset( $res_84 ); +- unset( $pos_84 ); ++ if( $_87 === FALSE) { ++ $result = $res_88; ++ $this->pos = $pos_88; ++ unset( $res_88 ); ++ unset( $pos_88 ); + break; + } + } +@@ -709,32 +727,32 @@ function match_Lookup ($stack = array()) { + $this->pos += 1; + $result[""text""] .= '.'; + } +- else { $_87 = FALSE; break; } ++ else { $_91 = FALSE; break; } + $matcher = 'match_'.'LastLookupStep'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_87 = FALSE; break; } +- $_87 = TRUE; break; ++ else { $_91 = FALSE; break; } ++ $_91 = TRUE; break; + } + while(0); +- if( $_87 === TRUE ) { $_90 = TRUE; break; } +- $result = $res_79; +- $this->pos = $pos_79; ++ if( $_91 === TRUE ) { $_94 = TRUE; break; } ++ $result = $res_83; ++ $this->pos = $pos_83; + $matcher = 'match_'.'LastLookupStep'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_90 = TRUE; break; ++ $_94 = TRUE; break; + } +- $result = $res_79; +- $this->pos = $pos_79; +- $_90 = FALSE; break; ++ $result = $res_83; ++ $this->pos = $pos_83; ++ $_94 = FALSE; break; + } + while(0); +- if( $_90 === TRUE ) { return $this->finalise($result); } +- if( $_90 === FALSE) { return FALSE; } ++ if( $_94 === TRUE ) { return $this->finalise($result); } ++ if( $_94 === FALSE) { return FALSE; } + } + + +@@ -780,112 +798,112 @@ function Lookup_LastLookupStep(&$res, $sub) + protected $match_Translate_typestack = array('Translate'); + function match_Translate ($stack = array()) { + $matchrule = ""Translate""; $result = $this->construct($matchrule, $matchrule, null); +- $_116 = NULL; ++ $_120 = NULL; + do { + if (( $subres = $this->literal( '<%t' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_116 = FALSE; break; } ++ else { $_120 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'Entity'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_116 = FALSE; break; } ++ else { $_120 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_98 = $result; +- $pos_98 = $this->pos; +- $_97 = NULL; ++ $res_102 = $result; ++ $pos_102 = $this->pos; ++ $_101 = NULL; + do { + $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Default"" ); + } +- else { $_97 = FALSE; break; } +- $_97 = TRUE; break; ++ else { $_101 = FALSE; break; } ++ $_101 = TRUE; break; + } + while(0); +- if( $_97 === FALSE) { +- $result = $res_98; +- $this->pos = $pos_98; +- unset( $res_98 ); +- unset( $pos_98 ); ++ if( $_101 === FALSE) { ++ $result = $res_102; ++ $this->pos = $pos_102; ++ unset( $res_102 ); ++ unset( $pos_102 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_109 = $result; +- $pos_109 = $this->pos; +- $_108 = NULL; ++ $res_113 = $result; ++ $pos_113 = $this->pos; ++ $_112 = NULL; + do { +- $res_103 = $result; +- $pos_103 = $this->pos; +- $_102 = NULL; ++ $res_107 = $result; ++ $pos_107 = $this->pos; ++ $_106 = NULL; + do { + if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_102 = FALSE; break; } ++ else { $_106 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '=') { + $this->pos += 1; + $result[""text""] .= '='; + } +- else { $_102 = FALSE; break; } +- $_102 = TRUE; break; ++ else { $_106 = FALSE; break; } ++ $_106 = TRUE; break; + } + while(0); +- if( $_102 === TRUE ) { +- $result = $res_103; +- $this->pos = $pos_103; +- $_108 = FALSE; break; ++ if( $_106 === TRUE ) { ++ $result = $res_107; ++ $this->pos = $pos_107; ++ $_112 = FALSE; break; + } +- if( $_102 === FALSE) { +- $result = $res_103; +- $this->pos = $pos_103; ++ if( $_106 === FALSE) { ++ $result = $res_107; ++ $this->pos = $pos_107; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'is' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_108 = FALSE; break; } ++ else { $_112 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Context"" ); + } +- else { $_108 = FALSE; break; } +- $_108 = TRUE; break; ++ else { $_112 = FALSE; break; } ++ $_112 = TRUE; break; + } + while(0); +- if( $_108 === FALSE) { +- $result = $res_109; +- $this->pos = $pos_109; +- unset( $res_109 ); +- unset( $pos_109 ); ++ if( $_112 === FALSE) { ++ $result = $res_113; ++ $this->pos = $pos_113; ++ unset( $res_113 ); ++ unset( $pos_113 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_113 = $result; +- $pos_113 = $this->pos; +- $_112 = NULL; ++ $res_117 = $result; ++ $pos_117 = $this->pos; ++ $_116 = NULL; + do { + $matcher = 'match_'.'InjectionVariables'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_112 = FALSE; break; } +- $_112 = TRUE; break; ++ else { $_116 = FALSE; break; } ++ $_116 = TRUE; break; + } + while(0); +- if( $_112 === FALSE) { +- $result = $res_113; +- $this->pos = $pos_113; +- unset( $res_113 ); +- unset( $pos_113 ); ++ if( $_116 === FALSE) { ++ $result = $res_117; ++ $this->pos = $pos_117; ++ unset( $res_117 ); ++ unset( $pos_117 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_116 = FALSE; break; } +- $_116 = TRUE; break; ++ else { $_120 = FALSE; break; } ++ $_120 = TRUE; break; + } + while(0); +- if( $_116 === TRUE ) { return $this->finalise($result); } +- if( $_116 === FALSE) { return FALSE; } ++ if( $_120 === TRUE ) { return $this->finalise($result); } ++ if( $_120 === FALSE) { return FALSE; } + } + + +@@ -895,9 +913,9 @@ function match_InjectionVariables ($stack = array()) { + $matchrule = ""InjectionVariables""; $result = $this->construct($matchrule, $matchrule, null); + $count = 0; + while (true) { +- $res_123 = $result; +- $pos_123 = $this->pos; +- $_122 = NULL; ++ $res_127 = $result; ++ $pos_127 = $this->pos; ++ $_126 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; +@@ -905,26 +923,26 @@ function match_InjectionVariables ($stack = array()) { + if ($subres !== FALSE) { + $this->store( $result, $subres, ""InjectionName"" ); + } +- else { $_122 = FALSE; break; } ++ else { $_126 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '=') { + $this->pos += 1; + $result[""text""] .= '='; + } +- else { $_122 = FALSE; break; } ++ else { $_126 = FALSE; break; } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_122 = FALSE; break; } +- $_122 = TRUE; break; ++ else { $_126 = FALSE; break; } ++ $_126 = TRUE; break; + } + while(0); +- if( $_122 === FALSE) { +- $result = $res_123; +- $this->pos = $pos_123; +- unset( $res_123 ); +- unset( $pos_123 ); ++ if( $_126 === FALSE) { ++ $result = $res_127; ++ $this->pos = $pos_127; ++ unset( $res_127 ); ++ unset( $pos_127 ); + break; + } + $count += 1; +@@ -1001,29 +1019,79 @@ function InjectionVariables__finalise(&$res) + $res['php'] .= ']'; + } + ++ /* MalformedBracketInjection: ""{$"" :Lookup !( ""}"" ) */ ++ protected $match_MalformedBracketInjection_typestack = array('MalformedBracketInjection'); ++ function match_MalformedBracketInjection ($stack = array()) { ++ $matchrule = ""MalformedBracketInjection""; $result = $this->construct($matchrule, $matchrule, null); ++ $_134 = NULL; ++ do { ++ if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result[""text""] .= $subres; } ++ else { $_134 = FALSE; break; } ++ $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres, ""Lookup"" ); ++ } ++ else { $_134 = FALSE; break; } ++ $res_133 = $result; ++ $pos_133 = $this->pos; ++ $_132 = NULL; ++ do { ++ if (substr($this->string,$this->pos,1) == '}') { ++ $this->pos += 1; ++ $result[""text""] .= '}'; ++ } ++ else { $_132 = FALSE; break; } ++ $_132 = TRUE; break; ++ } ++ while(0); ++ if( $_132 === TRUE ) { ++ $result = $res_133; ++ $this->pos = $pos_133; ++ $_134 = FALSE; break; ++ } ++ if( $_132 === FALSE) { ++ $result = $res_133; ++ $this->pos = $pos_133; ++ } ++ $_134 = TRUE; break; ++ } ++ while(0); ++ if( $_134 === TRUE ) { return $this->finalise($result); } ++ if( $_134 === FALSE) { return FALSE; } ++ } ++ ++ ++ ++ function MalformedBracketInjection__finalise(&$res) ++ { ++ $lookup = $res['text']; ++ throw new SSTemplateParseException(""Malformed bracket injection $lookup. Perhaps you have forgotten the "" . ++ ""closing bracket (})?"", $this); ++ } + + /* SimpleInjection: '$' :Lookup */ + protected $match_SimpleInjection_typestack = array('SimpleInjection'); + function match_SimpleInjection ($stack = array()) { + $matchrule = ""SimpleInjection""; $result = $this->construct($matchrule, $matchrule, null); +- $_127 = NULL; ++ $_138 = NULL; + do { + if (substr($this->string,$this->pos,1) == '$') { + $this->pos += 1; + $result[""text""] .= '$'; + } +- else { $_127 = FALSE; break; } ++ else { $_138 = FALSE; break; } + $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Lookup"" ); + } +- else { $_127 = FALSE; break; } +- $_127 = TRUE; break; ++ else { $_138 = FALSE; break; } ++ $_138 = TRUE; break; + } + while(0); +- if( $_127 === TRUE ) { return $this->finalise($result); } +- if( $_127 === FALSE) { return FALSE; } ++ if( $_138 === TRUE ) { return $this->finalise($result); } ++ if( $_138 === FALSE) { return FALSE; } + } + + +@@ -1031,26 +1099,26 @@ function match_SimpleInjection ($stack = array()) { + protected $match_BracketInjection_typestack = array('BracketInjection'); + function match_BracketInjection ($stack = array()) { + $matchrule = ""BracketInjection""; $result = $this->construct($matchrule, $matchrule, null); +- $_132 = NULL; ++ $_143 = NULL; + do { + if (( $subres = $this->literal( '{$' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_132 = FALSE; break; } ++ else { $_143 = FALSE; break; } + $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Lookup"" ); + } +- else { $_132 = FALSE; break; } ++ else { $_143 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '}') { + $this->pos += 1; + $result[""text""] .= '}'; + } +- else { $_132 = FALSE; break; } +- $_132 = TRUE; break; ++ else { $_143 = FALSE; break; } ++ $_143 = TRUE; break; + } + while(0); +- if( $_132 === TRUE ) { return $this->finalise($result); } +- if( $_132 === FALSE) { return FALSE; } ++ if( $_143 === TRUE ) { return $this->finalise($result); } ++ if( $_143 === FALSE) { return FALSE; } + } + + +@@ -1058,31 +1126,31 @@ function match_BracketInjection ($stack = array()) { + protected $match_Injection_typestack = array('Injection'); + function match_Injection ($stack = array()) { + $matchrule = ""Injection""; $result = $this->construct($matchrule, $matchrule, null); +- $_137 = NULL; ++ $_148 = NULL; + do { +- $res_134 = $result; +- $pos_134 = $this->pos; ++ $res_145 = $result; ++ $pos_145 = $this->pos; + $matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_137 = TRUE; break; ++ $_148 = TRUE; break; + } +- $result = $res_134; +- $this->pos = $pos_134; ++ $result = $res_145; ++ $this->pos = $pos_145; + $matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_137 = TRUE; break; ++ $_148 = TRUE; break; + } +- $result = $res_134; +- $this->pos = $pos_134; +- $_137 = FALSE; break; ++ $result = $res_145; ++ $this->pos = $pos_145; ++ $_148 = FALSE; break; + } + while(0); +- if( $_137 === TRUE ) { return $this->finalise($result); } +- if( $_137 === FALSE) { return FALSE; } ++ if( $_148 === TRUE ) { return $this->finalise($result); } ++ if( $_148 === FALSE) { return FALSE; } + } + + +@@ -1116,7 +1184,7 @@ function DollarMarkedLookup_STR(&$res, $sub) + protected $match_QuotedString_typestack = array('QuotedString'); + function match_QuotedString ($stack = array()) { + $matchrule = ""QuotedString""; $result = $this->construct($matchrule, $matchrule, null); +- $_143 = NULL; ++ $_154 = NULL; + do { + $stack[] = $result; $result = $this->construct( $matchrule, ""q"" ); + if (( $subres = $this->rx( '/[\'""]/' ) ) !== FALSE) { +@@ -1126,7 +1194,7 @@ function match_QuotedString ($stack = array()) { + } + else { + $result = array_pop($stack); +- $_143 = FALSE; break; ++ $_154 = FALSE; break; + } + $stack[] = $result; $result = $this->construct( $matchrule, ""String"" ); + if (( $subres = $this->rx( '/ (\\\\\\\\ | \\\\. | [^'.$this->expression($result, $stack, 'q').'\\\\])* /' ) ) !== FALSE) { +@@ -1136,15 +1204,15 @@ function match_QuotedString ($stack = array()) { + } + else { + $result = array_pop($stack); +- $_143 = FALSE; break; ++ $_154 = FALSE; break; + } + if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'q').'' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_143 = FALSE; break; } +- $_143 = TRUE; break; ++ else { $_154 = FALSE; break; } ++ $_154 = TRUE; break; + } + while(0); +- if( $_143 === TRUE ) { return $this->finalise($result); } +- if( $_143 === FALSE) { return FALSE; } ++ if( $_154 === TRUE ) { return $this->finalise($result); } ++ if( $_154 === FALSE) { return FALSE; } + } + + +@@ -1168,45 +1236,45 @@ function match_FreeString ($stack = array()) { + protected $match_Argument_typestack = array('Argument'); + function match_Argument ($stack = array()) { + $matchrule = ""Argument""; $result = $this->construct($matchrule, $matchrule, null); +- $_163 = NULL; ++ $_174 = NULL; + do { +- $res_146 = $result; +- $pos_146 = $this->pos; ++ $res_157 = $result; ++ $pos_157 = $this->pos; + $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""DollarMarkedLookup"" ); +- $_163 = TRUE; break; ++ $_174 = TRUE; break; + } +- $result = $res_146; +- $this->pos = $pos_146; +- $_161 = NULL; ++ $result = $res_157; ++ $this->pos = $pos_157; ++ $_172 = NULL; + do { +- $res_148 = $result; +- $pos_148 = $this->pos; ++ $res_159 = $result; ++ $pos_159 = $this->pos; + $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""QuotedString"" ); +- $_161 = TRUE; break; ++ $_172 = TRUE; break; + } +- $result = $res_148; +- $this->pos = $pos_148; +- $_159 = NULL; ++ $result = $res_159; ++ $this->pos = $pos_159; ++ $_170 = NULL; + do { +- $res_150 = $result; +- $pos_150 = $this->pos; +- $_156 = NULL; ++ $res_161 = $result; ++ $pos_161 = $this->pos; ++ $_167 = NULL; + do { + $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Lookup"" ); + } +- else { $_156 = FALSE; break; } +- $res_155 = $result; +- $pos_155 = $this->pos; +- $_154 = NULL; ++ else { $_167 = FALSE; break; } ++ $res_166 = $result; ++ $pos_166 = $this->pos; ++ $_165 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos; +@@ -1214,50 +1282,50 @@ function match_Argument ($stack = array()) { + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_154 = FALSE; break; } +- $_154 = TRUE; break; ++ else { $_165 = FALSE; break; } ++ $_165 = TRUE; break; + } + while(0); +- if( $_154 === TRUE ) { +- $result = $res_155; +- $this->pos = $pos_155; +- $_156 = FALSE; break; ++ if( $_165 === TRUE ) { ++ $result = $res_166; ++ $this->pos = $pos_166; ++ $_167 = FALSE; break; + } +- if( $_154 === FALSE) { +- $result = $res_155; +- $this->pos = $pos_155; ++ if( $_165 === FALSE) { ++ $result = $res_166; ++ $this->pos = $pos_166; + } +- $_156 = TRUE; break; ++ $_167 = TRUE; break; + } + while(0); +- if( $_156 === TRUE ) { $_159 = TRUE; break; } +- $result = $res_150; +- $this->pos = $pos_150; ++ if( $_167 === TRUE ) { $_170 = TRUE; break; } ++ $result = $res_161; ++ $this->pos = $pos_161; + $matcher = 'match_'.'FreeString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""FreeString"" ); +- $_159 = TRUE; break; ++ $_170 = TRUE; break; + } +- $result = $res_150; +- $this->pos = $pos_150; +- $_159 = FALSE; break; ++ $result = $res_161; ++ $this->pos = $pos_161; ++ $_170 = FALSE; break; + } + while(0); +- if( $_159 === TRUE ) { $_161 = TRUE; break; } +- $result = $res_148; +- $this->pos = $pos_148; +- $_161 = FALSE; break; ++ if( $_170 === TRUE ) { $_172 = TRUE; break; } ++ $result = $res_159; ++ $this->pos = $pos_159; ++ $_172 = FALSE; break; + } + while(0); +- if( $_161 === TRUE ) { $_163 = TRUE; break; } +- $result = $res_146; +- $this->pos = $pos_146; +- $_163 = FALSE; break; ++ if( $_172 === TRUE ) { $_174 = TRUE; break; } ++ $result = $res_157; ++ $this->pos = $pos_157; ++ $_174 = FALSE; break; + } + while(0); +- if( $_163 === TRUE ) { return $this->finalise($result); } +- if( $_163 === FALSE) { return FALSE; } ++ if( $_174 === TRUE ) { return $this->finalise($result); } ++ if( $_174 === FALSE) { return FALSE; } + } + + +@@ -1311,110 +1379,110 @@ function Argument_FreeString(&$res, $sub) + protected $match_ComparisonOperator_typestack = array('ComparisonOperator'); + function match_ComparisonOperator ($stack = array()) { + $matchrule = ""ComparisonOperator""; $result = $this->construct($matchrule, $matchrule, null); +- $_188 = NULL; ++ $_199 = NULL; + do { +- $res_165 = $result; +- $pos_165 = $this->pos; ++ $res_176 = $result; ++ $pos_176 = $this->pos; + if (( $subres = $this->literal( '!=' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_188 = TRUE; break; ++ $_199 = TRUE; break; + } +- $result = $res_165; +- $this->pos = $pos_165; +- $_186 = NULL; ++ $result = $res_176; ++ $this->pos = $pos_176; ++ $_197 = NULL; + do { +- $res_167 = $result; +- $pos_167 = $this->pos; ++ $res_178 = $result; ++ $pos_178 = $this->pos; + if (( $subres = $this->literal( '==' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_186 = TRUE; break; ++ $_197 = TRUE; break; + } +- $result = $res_167; +- $this->pos = $pos_167; +- $_184 = NULL; ++ $result = $res_178; ++ $this->pos = $pos_178; ++ $_195 = NULL; + do { +- $res_169 = $result; +- $pos_169 = $this->pos; ++ $res_180 = $result; ++ $pos_180 = $this->pos; + if (( $subres = $this->literal( '>=' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_184 = TRUE; break; ++ $_195 = TRUE; break; + } +- $result = $res_169; +- $this->pos = $pos_169; +- $_182 = NULL; ++ $result = $res_180; ++ $this->pos = $pos_180; ++ $_193 = NULL; + do { +- $res_171 = $result; +- $pos_171 = $this->pos; ++ $res_182 = $result; ++ $pos_182 = $this->pos; + if (substr($this->string,$this->pos,1) == '>') { + $this->pos += 1; + $result[""text""] .= '>'; +- $_182 = TRUE; break; ++ $_193 = TRUE; break; + } +- $result = $res_171; +- $this->pos = $pos_171; +- $_180 = NULL; ++ $result = $res_182; ++ $this->pos = $pos_182; ++ $_191 = NULL; + do { +- $res_173 = $result; +- $pos_173 = $this->pos; ++ $res_184 = $result; ++ $pos_184 = $this->pos; + if (( $subres = $this->literal( '<=' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_180 = TRUE; break; ++ $_191 = TRUE; break; + } +- $result = $res_173; +- $this->pos = $pos_173; +- $_178 = NULL; ++ $result = $res_184; ++ $this->pos = $pos_184; ++ $_189 = NULL; + do { +- $res_175 = $result; +- $pos_175 = $this->pos; ++ $res_186 = $result; ++ $pos_186 = $this->pos; + if (substr($this->string,$this->pos,1) == '<') { + $this->pos += 1; + $result[""text""] .= '<'; +- $_178 = TRUE; break; ++ $_189 = TRUE; break; + } +- $result = $res_175; +- $this->pos = $pos_175; ++ $result = $res_186; ++ $this->pos = $pos_186; + if (substr($this->string,$this->pos,1) == '=') { + $this->pos += 1; + $result[""text""] .= '='; +- $_178 = TRUE; break; ++ $_189 = TRUE; break; + } +- $result = $res_175; +- $this->pos = $pos_175; +- $_178 = FALSE; break; ++ $result = $res_186; ++ $this->pos = $pos_186; ++ $_189 = FALSE; break; + } + while(0); +- if( $_178 === TRUE ) { $_180 = TRUE; break; } +- $result = $res_173; +- $this->pos = $pos_173; +- $_180 = FALSE; break; ++ if( $_189 === TRUE ) { $_191 = TRUE; break; } ++ $result = $res_184; ++ $this->pos = $pos_184; ++ $_191 = FALSE; break; + } + while(0); +- if( $_180 === TRUE ) { $_182 = TRUE; break; } +- $result = $res_171; +- $this->pos = $pos_171; +- $_182 = FALSE; break; ++ if( $_191 === TRUE ) { $_193 = TRUE; break; } ++ $result = $res_182; ++ $this->pos = $pos_182; ++ $_193 = FALSE; break; + } + while(0); +- if( $_182 === TRUE ) { $_184 = TRUE; break; } +- $result = $res_169; +- $this->pos = $pos_169; +- $_184 = FALSE; break; ++ if( $_193 === TRUE ) { $_195 = TRUE; break; } ++ $result = $res_180; ++ $this->pos = $pos_180; ++ $_195 = FALSE; break; + } + while(0); +- if( $_184 === TRUE ) { $_186 = TRUE; break; } +- $result = $res_167; +- $this->pos = $pos_167; +- $_186 = FALSE; break; ++ if( $_195 === TRUE ) { $_197 = TRUE; break; } ++ $result = $res_178; ++ $this->pos = $pos_178; ++ $_197 = FALSE; break; + } + while(0); +- if( $_186 === TRUE ) { $_188 = TRUE; break; } +- $result = $res_165; +- $this->pos = $pos_165; +- $_188 = FALSE; break; ++ if( $_197 === TRUE ) { $_199 = TRUE; break; } ++ $result = $res_176; ++ $this->pos = $pos_176; ++ $_199 = FALSE; break; + } + while(0); +- if( $_188 === TRUE ) { return $this->finalise($result); } +- if( $_188 === FALSE) { return FALSE; } ++ if( $_199 === TRUE ) { return $this->finalise($result); } ++ if( $_199 === FALSE) { return FALSE; } + } + + +@@ -1422,33 +1490,33 @@ function match_ComparisonOperator ($stack = array()) { + protected $match_Comparison_typestack = array('Comparison'); + function match_Comparison ($stack = array()) { + $matchrule = ""Comparison""; $result = $this->construct($matchrule, $matchrule, null); +- $_195 = NULL; ++ $_206 = NULL; + do { + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_195 = FALSE; break; } ++ else { $_206 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'ComparisonOperator'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_195 = FALSE; break; } ++ else { $_206 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_195 = FALSE; break; } +- $_195 = TRUE; break; ++ else { $_206 = FALSE; break; } ++ $_206 = TRUE; break; + } + while(0); +- if( $_195 === TRUE ) { return $this->finalise($result); } +- if( $_195 === FALSE) { return FALSE; } ++ if( $_206 === TRUE ) { return $this->finalise($result); } ++ if( $_206 === FALSE) { return FALSE; } + } + + +@@ -1475,11 +1543,11 @@ function Comparison_ComparisonOperator(&$res, $sub) + protected $match_PresenceCheck_typestack = array('PresenceCheck'); + function match_PresenceCheck ($stack = array()) { + $matchrule = ""PresenceCheck""; $result = $this->construct($matchrule, $matchrule, null); +- $_202 = NULL; ++ $_213 = NULL; + do { +- $res_200 = $result; +- $pos_200 = $this->pos; +- $_199 = NULL; ++ $res_211 = $result; ++ $pos_211 = $this->pos; ++ $_210 = NULL; + do { + $stack[] = $result; $result = $this->construct( $matchrule, ""Not"" ); + if (( $subres = $this->literal( 'not' ) ) !== FALSE) { +@@ -1489,29 +1557,29 @@ function match_PresenceCheck ($stack = array()) { + } + else { + $result = array_pop($stack); +- $_199 = FALSE; break; ++ $_210 = FALSE; break; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $_199 = TRUE; break; ++ $_210 = TRUE; break; + } + while(0); +- if( $_199 === FALSE) { +- $result = $res_200; +- $this->pos = $pos_200; +- unset( $res_200 ); +- unset( $pos_200 ); ++ if( $_210 === FALSE) { ++ $result = $res_211; ++ $this->pos = $pos_211; ++ unset( $res_211 ); ++ unset( $pos_211 ); + } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_202 = FALSE; break; } +- $_202 = TRUE; break; ++ else { $_213 = FALSE; break; } ++ $_213 = TRUE; break; + } + while(0); +- if( $_202 === TRUE ) { return $this->finalise($result); } +- if( $_202 === FALSE) { return FALSE; } ++ if( $_213 === TRUE ) { return $this->finalise($result); } ++ if( $_213 === FALSE) { return FALSE; } + } + + +@@ -1537,31 +1605,31 @@ function PresenceCheck_Argument(&$res, $sub) + protected $match_IfArgumentPortion_typestack = array('IfArgumentPortion'); + function match_IfArgumentPortion ($stack = array()) { + $matchrule = ""IfArgumentPortion""; $result = $this->construct($matchrule, $matchrule, null); +- $_207 = NULL; ++ $_218 = NULL; + do { +- $res_204 = $result; +- $pos_204 = $this->pos; ++ $res_215 = $result; ++ $pos_215 = $this->pos; + $matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_207 = TRUE; break; ++ $_218 = TRUE; break; + } +- $result = $res_204; +- $this->pos = $pos_204; ++ $result = $res_215; ++ $this->pos = $pos_215; + $matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_207 = TRUE; break; ++ $_218 = TRUE; break; + } +- $result = $res_204; +- $this->pos = $pos_204; +- $_207 = FALSE; break; ++ $result = $res_215; ++ $this->pos = $pos_215; ++ $_218 = FALSE; break; + } + while(0); +- if( $_207 === TRUE ) { return $this->finalise($result); } +- if( $_207 === FALSE) { return FALSE; } ++ if( $_218 === TRUE ) { return $this->finalise($result); } ++ if( $_218 === FALSE) { return FALSE; } + } + + +@@ -1575,27 +1643,27 @@ function IfArgumentPortion_STR(&$res, $sub) + protected $match_BooleanOperator_typestack = array('BooleanOperator'); + function match_BooleanOperator ($stack = array()) { + $matchrule = ""BooleanOperator""; $result = $this->construct($matchrule, $matchrule, null); +- $_212 = NULL; ++ $_223 = NULL; + do { +- $res_209 = $result; +- $pos_209 = $this->pos; ++ $res_220 = $result; ++ $pos_220 = $this->pos; + if (( $subres = $this->literal( '||' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_212 = TRUE; break; ++ $_223 = TRUE; break; + } +- $result = $res_209; +- $this->pos = $pos_209; ++ $result = $res_220; ++ $this->pos = $pos_220; + if (( $subres = $this->literal( '&&' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_212 = TRUE; break; ++ $_223 = TRUE; break; + } +- $result = $res_209; +- $this->pos = $pos_209; +- $_212 = FALSE; break; ++ $result = $res_220; ++ $this->pos = $pos_220; ++ $_223 = FALSE; break; + } + while(0); +- if( $_212 === TRUE ) { return $this->finalise($result); } +- if( $_212 === FALSE) { return FALSE; } ++ if( $_223 === TRUE ) { return $this->finalise($result); } ++ if( $_223 === FALSE) { return FALSE; } + } + + +@@ -1603,18 +1671,18 @@ function match_BooleanOperator ($stack = array()) { + protected $match_IfArgument_typestack = array('IfArgument'); + function match_IfArgument ($stack = array()) { + $matchrule = ""IfArgument""; $result = $this->construct($matchrule, $matchrule, null); +- $_221 = NULL; ++ $_232 = NULL; + do { + $matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""IfArgumentPortion"" ); + } +- else { $_221 = FALSE; break; } ++ else { $_232 = FALSE; break; } + while (true) { +- $res_220 = $result; +- $pos_220 = $this->pos; +- $_219 = NULL; ++ $res_231 = $result; ++ $pos_231 = $this->pos; ++ $_230 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'BooleanOperator'; $key = $matcher; $pos = $this->pos; +@@ -1622,30 +1690,30 @@ function match_IfArgument ($stack = array()) { + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BooleanOperator"" ); + } +- else { $_219 = FALSE; break; } ++ else { $_230 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'IfArgumentPortion'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""IfArgumentPortion"" ); + } +- else { $_219 = FALSE; break; } +- $_219 = TRUE; break; ++ else { $_230 = FALSE; break; } ++ $_230 = TRUE; break; + } + while(0); +- if( $_219 === FALSE) { +- $result = $res_220; +- $this->pos = $pos_220; +- unset( $res_220 ); +- unset( $pos_220 ); ++ if( $_230 === FALSE) { ++ $result = $res_231; ++ $this->pos = $pos_231; ++ unset( $res_231 ); ++ unset( $pos_231 ); + break; + } + } +- $_221 = TRUE; break; ++ $_232 = TRUE; break; + } + while(0); +- if( $_221 === TRUE ) { return $this->finalise($result); } +- if( $_221 === FALSE) { return FALSE; } ++ if( $_232 === TRUE ) { return $this->finalise($result); } ++ if( $_232 === FALSE) { return FALSE; } + } + + +@@ -1664,42 +1732,42 @@ function IfArgument_BooleanOperator(&$res, $sub) + protected $match_IfPart_typestack = array('IfPart'); + function match_IfPart ($stack = array()) { + $matchrule = ""IfPart""; $result = $this->construct($matchrule, $matchrule, null); +- $_231 = NULL; ++ $_242 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_231 = FALSE; break; } ++ else { $_242 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'if' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_231 = FALSE; break; } ++ else { $_242 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_231 = FALSE; break; } ++ else { $_242 = FALSE; break; } + $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""IfArgument"" ); + } +- else { $_231 = FALSE; break; } ++ else { $_242 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_231 = FALSE; break; } +- $res_230 = $result; +- $pos_230 = $this->pos; ++ else { $_242 = FALSE; break; } ++ $res_241 = $result; ++ $pos_241 = $this->pos; + $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } + else { +- $result = $res_230; +- $this->pos = $pos_230; +- unset( $res_230 ); +- unset( $pos_230 ); ++ $result = $res_241; ++ $this->pos = $pos_241; ++ unset( $res_241 ); ++ unset( $pos_241 ); + } +- $_231 = TRUE; break; ++ $_242 = TRUE; break; + } + while(0); +- if( $_231 === TRUE ) { return $this->finalise($result); } +- if( $_231 === FALSE) { return FALSE; } ++ if( $_242 === TRUE ) { return $this->finalise($result); } ++ if( $_242 === FALSE) { return FALSE; } + } + + +@@ -1707,42 +1775,42 @@ function match_IfPart ($stack = array()) { + protected $match_ElseIfPart_typestack = array('ElseIfPart'); + function match_ElseIfPart ($stack = array()) { + $matchrule = ""ElseIfPart""; $result = $this->construct($matchrule, $matchrule, null); +- $_241 = NULL; ++ $_252 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_241 = FALSE; break; } ++ else { $_252 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_241 = FALSE; break; } ++ else { $_252 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_241 = FALSE; break; } ++ else { $_252 = FALSE; break; } + $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""IfArgument"" ); + } +- else { $_241 = FALSE; break; } ++ else { $_252 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_241 = FALSE; break; } +- $res_240 = $result; +- $pos_240 = $this->pos; ++ else { $_252 = FALSE; break; } ++ $res_251 = $result; ++ $pos_251 = $this->pos; + $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } + else { +- $result = $res_240; +- $this->pos = $pos_240; +- unset( $res_240 ); +- unset( $pos_240 ); ++ $result = $res_251; ++ $this->pos = $pos_251; ++ unset( $res_251 ); ++ unset( $pos_251 ); + } +- $_241 = TRUE; break; ++ $_252 = TRUE; break; + } + while(0); +- if( $_241 === TRUE ) { return $this->finalise($result); } +- if( $_241 === FALSE) { return FALSE; } ++ if( $_252 === TRUE ) { return $this->finalise($result); } ++ if( $_252 === FALSE) { return FALSE; } + } + + +@@ -1750,34 +1818,34 @@ function match_ElseIfPart ($stack = array()) { + protected $match_ElsePart_typestack = array('ElsePart'); + function match_ElsePart ($stack = array()) { + $matchrule = ""ElsePart""; $result = $this->construct($matchrule, $matchrule, null); +- $_249 = NULL; ++ $_260 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_249 = FALSE; break; } ++ else { $_260 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'else' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_249 = FALSE; break; } ++ else { $_260 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_249 = FALSE; break; } +- $res_248 = $result; +- $pos_248 = $this->pos; ++ else { $_260 = FALSE; break; } ++ $res_259 = $result; ++ $pos_259 = $this->pos; + $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } + else { +- $result = $res_248; +- $this->pos = $pos_248; +- unset( $res_248 ); +- unset( $pos_248 ); ++ $result = $res_259; ++ $this->pos = $pos_259; ++ unset( $res_259 ); ++ unset( $pos_259 ); + } +- $_249 = TRUE; break; ++ $_260 = TRUE; break; + } + while(0); +- if( $_249 === TRUE ) { return $this->finalise($result); } +- if( $_249 === FALSE) { return FALSE; } ++ if( $_260 === TRUE ) { return $this->finalise($result); } ++ if( $_260 === FALSE) { return FALSE; } + } + + +@@ -1785,56 +1853,56 @@ function match_ElsePart ($stack = array()) { + protected $match_If_typestack = array('If'); + function match_If ($stack = array()) { + $matchrule = ""If""; $result = $this->construct($matchrule, $matchrule, null); +- $_259 = NULL; ++ $_270 = NULL; + do { + $matcher = 'match_'.'IfPart'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_259 = FALSE; break; } ++ else { $_270 = FALSE; break; } + while (true) { +- $res_252 = $result; +- $pos_252 = $this->pos; ++ $res_263 = $result; ++ $pos_263 = $this->pos; + $matcher = 'match_'.'ElseIfPart'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } + else { +- $result = $res_252; +- $this->pos = $pos_252; +- unset( $res_252 ); +- unset( $pos_252 ); ++ $result = $res_263; ++ $this->pos = $pos_263; ++ unset( $res_263 ); ++ unset( $pos_263 ); + break; + } + } +- $res_253 = $result; +- $pos_253 = $this->pos; ++ $res_264 = $result; ++ $pos_264 = $this->pos; + $matcher = 'match_'.'ElsePart'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } + else { +- $result = $res_253; +- $this->pos = $pos_253; +- unset( $res_253 ); +- unset( $pos_253 ); ++ $result = $res_264; ++ $this->pos = $pos_264; ++ unset( $res_264 ); ++ unset( $pos_264 ); + } + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_259 = FALSE; break; } ++ else { $_270 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'end_if' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_259 = FALSE; break; } ++ else { $_270 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_259 = FALSE; break; } +- $_259 = TRUE; break; ++ else { $_270 = FALSE; break; } ++ $_270 = TRUE; break; + } + while(0); +- if( $_259 === TRUE ) { return $this->finalise($result); } +- if( $_259 === FALSE) { return FALSE; } ++ if( $_270 === TRUE ) { return $this->finalise($result); } ++ if( $_270 === FALSE) { return FALSE; } + } + + +@@ -1867,61 +1935,61 @@ function If_ElsePart(&$res, $sub) + protected $match_Require_typestack = array('Require'); + function match_Require ($stack = array()) { + $matchrule = ""Require""; $result = $this->construct($matchrule, $matchrule, null); +- $_275 = NULL; ++ $_286 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_275 = FALSE; break; } ++ else { $_286 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'require' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_275 = FALSE; break; } ++ else { $_286 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_275 = FALSE; break; } ++ else { $_286 = FALSE; break; } + $stack[] = $result; $result = $this->construct( $matchrule, ""Call"" ); +- $_271 = NULL; ++ $_282 = NULL; + do { + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Method"" ); + } +- else { $_271 = FALSE; break; } ++ else { $_282 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '(') { + $this->pos += 1; + $result[""text""] .= '('; + } +- else { $_271 = FALSE; break; } ++ else { $_282 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""CallArguments"" ); + } +- else { $_271 = FALSE; break; } ++ else { $_282 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ')') { + $this->pos += 1; + $result[""text""] .= ')'; + } +- else { $_271 = FALSE; break; } +- $_271 = TRUE; break; ++ else { $_282 = FALSE; break; } ++ $_282 = TRUE; break; + } + while(0); +- if( $_271 === TRUE ) { ++ if( $_282 === TRUE ) { + $subres = $result; $result = array_pop($stack); + $this->store( $result, $subres, 'Call' ); + } +- if( $_271 === FALSE) { ++ if( $_282 === FALSE) { + $result = array_pop($stack); +- $_275 = FALSE; break; ++ $_286 = FALSE; break; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_275 = FALSE; break; } +- $_275 = TRUE; break; ++ else { $_286 = FALSE; break; } ++ $_286 = TRUE; break; + } + while(0); +- if( $_275 === TRUE ) { return $this->finalise($result); } +- if( $_275 === FALSE) { return FALSE; } ++ if( $_286 === TRUE ) { return $this->finalise($result); } ++ if( $_286 === FALSE) { return FALSE; } + } + + +@@ -1943,97 +2011,97 @@ function Require_Call(&$res, $sub) + protected $match_CacheBlockArgument_typestack = array('CacheBlockArgument'); + function match_CacheBlockArgument ($stack = array()) { + $matchrule = ""CacheBlockArgument""; $result = $this->construct($matchrule, $matchrule, null); +- $_295 = NULL; ++ $_306 = NULL; + do { +- $res_283 = $result; +- $pos_283 = $this->pos; +- $_282 = NULL; ++ $res_294 = $result; ++ $pos_294 = $this->pos; ++ $_293 = NULL; + do { +- $_280 = NULL; ++ $_291 = NULL; + do { +- $res_277 = $result; +- $pos_277 = $this->pos; ++ $res_288 = $result; ++ $pos_288 = $this->pos; + if (( $subres = $this->literal( 'if ' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_280 = TRUE; break; ++ $_291 = TRUE; break; + } +- $result = $res_277; +- $this->pos = $pos_277; ++ $result = $res_288; ++ $this->pos = $pos_288; + if (( $subres = $this->literal( 'unless ' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_280 = TRUE; break; ++ $_291 = TRUE; break; + } +- $result = $res_277; +- $this->pos = $pos_277; +- $_280 = FALSE; break; ++ $result = $res_288; ++ $this->pos = $pos_288; ++ $_291 = FALSE; break; + } + while(0); +- if( $_280 === FALSE) { $_282 = FALSE; break; } +- $_282 = TRUE; break; ++ if( $_291 === FALSE) { $_293 = FALSE; break; } ++ $_293 = TRUE; break; + } + while(0); +- if( $_282 === TRUE ) { +- $result = $res_283; +- $this->pos = $pos_283; +- $_295 = FALSE; break; ++ if( $_293 === TRUE ) { ++ $result = $res_294; ++ $this->pos = $pos_294; ++ $_306 = FALSE; break; + } +- if( $_282 === FALSE) { +- $result = $res_283; +- $this->pos = $pos_283; ++ if( $_293 === FALSE) { ++ $result = $res_294; ++ $this->pos = $pos_294; + } +- $_293 = NULL; ++ $_304 = NULL; + do { +- $_291 = NULL; ++ $_302 = NULL; + do { +- $res_284 = $result; +- $pos_284 = $this->pos; ++ $res_295 = $result; ++ $pos_295 = $this->pos; + $matcher = 'match_'.'DollarMarkedLookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""DollarMarkedLookup"" ); +- $_291 = TRUE; break; ++ $_302 = TRUE; break; + } +- $result = $res_284; +- $this->pos = $pos_284; +- $_289 = NULL; ++ $result = $res_295; ++ $this->pos = $pos_295; ++ $_300 = NULL; + do { +- $res_286 = $result; +- $pos_286 = $this->pos; ++ $res_297 = $result; ++ $pos_297 = $this->pos; + $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""QuotedString"" ); +- $_289 = TRUE; break; ++ $_300 = TRUE; break; + } +- $result = $res_286; +- $this->pos = $pos_286; ++ $result = $res_297; ++ $this->pos = $pos_297; + $matcher = 'match_'.'Lookup'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Lookup"" ); +- $_289 = TRUE; break; ++ $_300 = TRUE; break; + } +- $result = $res_286; +- $this->pos = $pos_286; +- $_289 = FALSE; break; ++ $result = $res_297; ++ $this->pos = $pos_297; ++ $_300 = FALSE; break; + } + while(0); +- if( $_289 === TRUE ) { $_291 = TRUE; break; } +- $result = $res_284; +- $this->pos = $pos_284; +- $_291 = FALSE; break; ++ if( $_300 === TRUE ) { $_302 = TRUE; break; } ++ $result = $res_295; ++ $this->pos = $pos_295; ++ $_302 = FALSE; break; + } + while(0); +- if( $_291 === FALSE) { $_293 = FALSE; break; } +- $_293 = TRUE; break; ++ if( $_302 === FALSE) { $_304 = FALSE; break; } ++ $_304 = TRUE; break; + } + while(0); +- if( $_293 === FALSE) { $_295 = FALSE; break; } +- $_295 = TRUE; break; ++ if( $_304 === FALSE) { $_306 = FALSE; break; } ++ $_306 = TRUE; break; + } + while(0); +- if( $_295 === TRUE ) { return $this->finalise($result); } +- if( $_295 === FALSE) { return FALSE; } ++ if( $_306 === TRUE ) { return $this->finalise($result); } ++ if( $_306 === FALSE) { return FALSE; } + } + + +@@ -2057,48 +2125,48 @@ function CacheBlockArgument_Lookup(&$res, $sub) + protected $match_CacheBlockArguments_typestack = array('CacheBlockArguments'); + function match_CacheBlockArguments ($stack = array()) { + $matchrule = ""CacheBlockArguments""; $result = $this->construct($matchrule, $matchrule, null); +- $_304 = NULL; ++ $_315 = NULL; + do { + $matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_304 = FALSE; break; } ++ else { $_315 = FALSE; break; } + while (true) { +- $res_303 = $result; +- $pos_303 = $this->pos; +- $_302 = NULL; ++ $res_314 = $result; ++ $pos_314 = $this->pos; ++ $_313 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_302 = FALSE; break; } ++ else { $_313 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'CacheBlockArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_302 = FALSE; break; } +- $_302 = TRUE; break; ++ else { $_313 = FALSE; break; } ++ $_313 = TRUE; break; + } + while(0); +- if( $_302 === FALSE) { +- $result = $res_303; +- $this->pos = $pos_303; +- unset( $res_303 ); +- unset( $pos_303 ); ++ if( $_313 === FALSE) { ++ $result = $res_314; ++ $this->pos = $pos_314; ++ unset( $res_314 ); ++ unset( $pos_314 ); + break; + } + } +- $_304 = TRUE; break; ++ $_315 = TRUE; break; + } + while(0); +- if( $_304 === TRUE ) { return $this->finalise($result); } +- if( $_304 === FALSE) { return FALSE; } ++ if( $_315 === TRUE ) { return $this->finalise($result); } ++ if( $_315 === FALSE) { return FALSE; } + } + + +@@ -2115,210 +2183,228 @@ function CacheBlockArguments_CacheBlockArgument(&$res, $sub) + } + + /* CacheBlockTemplate: (Comment | Translate | If | Require | OldI18NTag | Include | ClosedBlock | +- OpenBlock | MalformedBlock | Injection | Text)+ */ ++ OpenBlock | MalformedBlock | MalformedBracketInjection | Injection | Text)+ */ + protected $match_CacheBlockTemplate_typestack = array('CacheBlockTemplate','Template'); + function match_CacheBlockTemplate ($stack = array()) { + $matchrule = ""CacheBlockTemplate""; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'CacheRestrictedTemplate')); + $count = 0; + while (true) { +- $res_348 = $result; +- $pos_348 = $this->pos; +- $_347 = NULL; ++ $res_363 = $result; ++ $pos_363 = $this->pos; ++ $_362 = NULL; + do { +- $_345 = NULL; ++ $_360 = NULL; + do { +- $res_306 = $result; +- $pos_306 = $this->pos; ++ $res_317 = $result; ++ $pos_317 = $this->pos; + $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_345 = TRUE; break; ++ $_360 = TRUE; break; + } +- $result = $res_306; +- $this->pos = $pos_306; +- $_343 = NULL; ++ $result = $res_317; ++ $this->pos = $pos_317; ++ $_358 = NULL; + do { +- $res_308 = $result; +- $pos_308 = $this->pos; ++ $res_319 = $result; ++ $pos_319 = $this->pos; + $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_343 = TRUE; break; ++ $_358 = TRUE; break; + } +- $result = $res_308; +- $this->pos = $pos_308; +- $_341 = NULL; ++ $result = $res_319; ++ $this->pos = $pos_319; ++ $_356 = NULL; + do { +- $res_310 = $result; +- $pos_310 = $this->pos; ++ $res_321 = $result; ++ $pos_321 = $this->pos; + $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_341 = TRUE; break; ++ $_356 = TRUE; break; + } +- $result = $res_310; +- $this->pos = $pos_310; +- $_339 = NULL; ++ $result = $res_321; ++ $this->pos = $pos_321; ++ $_354 = NULL; + do { +- $res_312 = $result; +- $pos_312 = $this->pos; ++ $res_323 = $result; ++ $pos_323 = $this->pos; + $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_339 = TRUE; break; ++ $_354 = TRUE; break; + } +- $result = $res_312; +- $this->pos = $pos_312; +- $_337 = NULL; ++ $result = $res_323; ++ $this->pos = $pos_323; ++ $_352 = NULL; + do { +- $res_314 = $result; +- $pos_314 = $this->pos; ++ $res_325 = $result; ++ $pos_325 = $this->pos; + $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_337 = TRUE; break; ++ $_352 = TRUE; break; + } +- $result = $res_314; +- $this->pos = $pos_314; +- $_335 = NULL; ++ $result = $res_325; ++ $this->pos = $pos_325; ++ $_350 = NULL; + do { +- $res_316 = $result; +- $pos_316 = $this->pos; ++ $res_327 = $result; ++ $pos_327 = $this->pos; + $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_335 = TRUE; break; ++ $_350 = TRUE; break; + } +- $result = $res_316; +- $this->pos = $pos_316; +- $_333 = NULL; ++ $result = $res_327; ++ $this->pos = $pos_327; ++ $_348 = NULL; + do { +- $res_318 = $result; +- $pos_318 = $this->pos; ++ $res_329 = $result; ++ $pos_329 = $this->pos; + $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_333 = TRUE; break; ++ $_348 = TRUE; break; + } +- $result = $res_318; +- $this->pos = $pos_318; +- $_331 = NULL; ++ $result = $res_329; ++ $this->pos = $pos_329; ++ $_346 = NULL; + do { +- $res_320 = $result; +- $pos_320 = $this->pos; ++ $res_331 = $result; ++ $pos_331 = $this->pos; + $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_331 = TRUE; break; ++ $_346 = TRUE; break; + } +- $result = $res_320; +- $this->pos = $pos_320; +- $_329 = NULL; ++ $result = $res_331; ++ $this->pos = $pos_331; ++ $_344 = NULL; + do { +- $res_322 = $result; +- $pos_322 = $this->pos; ++ $res_333 = $result; ++ $pos_333 = $this->pos; + $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_329 = TRUE; break; ++ $_344 = TRUE; break; + } +- $result = $res_322; +- $this->pos = $pos_322; +- $_327 = NULL; ++ $result = $res_333; ++ $this->pos = $pos_333; ++ $_342 = NULL; + do { +- $res_324 = $result; +- $pos_324 = $this->pos; +- $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $res_335 = $result; ++ $pos_335 = $this->pos; ++ $matcher = 'match_'.'MalformedBracketInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_327 = TRUE; break; ++ $_342 = TRUE; break; + } +- $result = $res_324; +- $this->pos = $pos_324; +- $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; +- $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); +- if ($subres !== FALSE) { +- $this->store( $result, $subres ); +- $_327 = TRUE; break; ++ $result = $res_335; ++ $this->pos = $pos_335; ++ $_340 = NULL; ++ do { ++ $res_337 = $result; ++ $pos_337 = $this->pos; ++ $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_340 = TRUE; break; ++ } ++ $result = $res_337; ++ $this->pos = $pos_337; ++ $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_340 = TRUE; break; ++ } ++ $result = $res_337; ++ $this->pos = $pos_337; ++ $_340 = FALSE; break; + } +- $result = $res_324; +- $this->pos = $pos_324; +- $_327 = FALSE; break; ++ while(0); ++ if( $_340 === TRUE ) { $_342 = TRUE; break; } ++ $result = $res_335; ++ $this->pos = $pos_335; ++ $_342 = FALSE; break; + } + while(0); +- if( $_327 === TRUE ) { $_329 = TRUE; break; } +- $result = $res_322; +- $this->pos = $pos_322; +- $_329 = FALSE; break; ++ if( $_342 === TRUE ) { $_344 = TRUE; break; } ++ $result = $res_333; ++ $this->pos = $pos_333; ++ $_344 = FALSE; break; + } + while(0); +- if( $_329 === TRUE ) { $_331 = TRUE; break; } +- $result = $res_320; +- $this->pos = $pos_320; +- $_331 = FALSE; break; ++ if( $_344 === TRUE ) { $_346 = TRUE; break; } ++ $result = $res_331; ++ $this->pos = $pos_331; ++ $_346 = FALSE; break; + } + while(0); +- if( $_331 === TRUE ) { $_333 = TRUE; break; } +- $result = $res_318; +- $this->pos = $pos_318; +- $_333 = FALSE; break; ++ if( $_346 === TRUE ) { $_348 = TRUE; break; } ++ $result = $res_329; ++ $this->pos = $pos_329; ++ $_348 = FALSE; break; + } + while(0); +- if( $_333 === TRUE ) { $_335 = TRUE; break; } +- $result = $res_316; +- $this->pos = $pos_316; +- $_335 = FALSE; break; ++ if( $_348 === TRUE ) { $_350 = TRUE; break; } ++ $result = $res_327; ++ $this->pos = $pos_327; ++ $_350 = FALSE; break; + } + while(0); +- if( $_335 === TRUE ) { $_337 = TRUE; break; } +- $result = $res_314; +- $this->pos = $pos_314; +- $_337 = FALSE; break; ++ if( $_350 === TRUE ) { $_352 = TRUE; break; } ++ $result = $res_325; ++ $this->pos = $pos_325; ++ $_352 = FALSE; break; + } + while(0); +- if( $_337 === TRUE ) { $_339 = TRUE; break; } +- $result = $res_312; +- $this->pos = $pos_312; +- $_339 = FALSE; break; ++ if( $_352 === TRUE ) { $_354 = TRUE; break; } ++ $result = $res_323; ++ $this->pos = $pos_323; ++ $_354 = FALSE; break; + } + while(0); +- if( $_339 === TRUE ) { $_341 = TRUE; break; } +- $result = $res_310; +- $this->pos = $pos_310; +- $_341 = FALSE; break; ++ if( $_354 === TRUE ) { $_356 = TRUE; break; } ++ $result = $res_321; ++ $this->pos = $pos_321; ++ $_356 = FALSE; break; + } + while(0); +- if( $_341 === TRUE ) { $_343 = TRUE; break; } +- $result = $res_308; +- $this->pos = $pos_308; +- $_343 = FALSE; break; ++ if( $_356 === TRUE ) { $_358 = TRUE; break; } ++ $result = $res_319; ++ $this->pos = $pos_319; ++ $_358 = FALSE; break; + } + while(0); +- if( $_343 === TRUE ) { $_345 = TRUE; break; } +- $result = $res_306; +- $this->pos = $pos_306; +- $_345 = FALSE; break; ++ if( $_358 === TRUE ) { $_360 = TRUE; break; } ++ $result = $res_317; ++ $this->pos = $pos_317; ++ $_360 = FALSE; break; + } + while(0); +- if( $_345 === FALSE) { $_347 = FALSE; break; } +- $_347 = TRUE; break; ++ if( $_360 === FALSE) { $_362 = FALSE; break; } ++ $_362 = TRUE; break; + } + while(0); +- if( $_347 === FALSE) { +- $result = $res_348; +- $this->pos = $pos_348; +- unset( $res_348 ); +- unset( $pos_348 ); ++ if( $_362 === FALSE) { ++ $result = $res_363; ++ $this->pos = $pos_363; ++ unset( $res_363 ); ++ unset( $pos_363 ); + break; + } + $count += 1; +@@ -2337,65 +2423,65 @@ function match_CacheBlockTemplate ($stack = array()) { + protected $match_UncachedBlock_typestack = array('UncachedBlock'); + function match_UncachedBlock ($stack = array()) { + $matchrule = ""UncachedBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_385 = NULL; ++ $_400 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } ++ else { $_400 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } ++ else { $_400 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_353 = $result; +- $pos_353 = $this->pos; ++ $res_368 = $result; ++ $pos_368 = $this->pos; + $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } + else { +- $result = $res_353; +- $this->pos = $pos_353; +- unset( $res_353 ); +- unset( $pos_353 ); +- } +- $res_365 = $result; +- $pos_365 = $this->pos; +- $_364 = NULL; ++ $result = $res_368; ++ $this->pos = $pos_368; ++ unset( $res_368 ); ++ unset( $pos_368 ); ++ } ++ $res_380 = $result; ++ $pos_380 = $this->pos; ++ $_379 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $stack[] = $result; $result = $this->construct( $matchrule, ""Conditional"" ); +- $_360 = NULL; ++ $_375 = NULL; + do { +- $_358 = NULL; ++ $_373 = NULL; + do { +- $res_355 = $result; +- $pos_355 = $this->pos; ++ $res_370 = $result; ++ $pos_370 = $this->pos; + if (( $subres = $this->literal( 'if' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_358 = TRUE; break; ++ $_373 = TRUE; break; + } +- $result = $res_355; +- $this->pos = $pos_355; ++ $result = $res_370; ++ $this->pos = $pos_370; + if (( $subres = $this->literal( 'unless' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_358 = TRUE; break; ++ $_373 = TRUE; break; + } +- $result = $res_355; +- $this->pos = $pos_355; +- $_358 = FALSE; break; ++ $result = $res_370; ++ $this->pos = $pos_370; ++ $_373 = FALSE; break; + } + while(0); +- if( $_358 === FALSE) { $_360 = FALSE; break; } +- $_360 = TRUE; break; ++ if( $_373 === FALSE) { $_375 = FALSE; break; } ++ $_375 = TRUE; break; + } + while(0); +- if( $_360 === TRUE ) { ++ if( $_375 === TRUE ) { + $subres = $result; $result = array_pop($stack); + $this->store( $result, $subres, 'Conditional' ); + } +- if( $_360 === FALSE) { ++ if( $_375 === FALSE) { + $result = array_pop($stack); +- $_364 = FALSE; break; ++ $_379 = FALSE; break; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; +@@ -2403,87 +2489,87 @@ function match_UncachedBlock ($stack = array()) { + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Condition"" ); + } +- else { $_364 = FALSE; break; } +- $_364 = TRUE; break; ++ else { $_379 = FALSE; break; } ++ $_379 = TRUE; break; + } + while(0); +- if( $_364 === FALSE) { +- $result = $res_365; +- $this->pos = $pos_365; +- unset( $res_365 ); +- unset( $pos_365 ); ++ if( $_379 === FALSE) { ++ $result = $res_380; ++ $this->pos = $pos_380; ++ unset( $res_380 ); ++ unset( $pos_380 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } +- $res_368 = $result; +- $pos_368 = $this->pos; ++ else { $_400 = FALSE; break; } ++ $res_383 = $result; ++ $pos_383 = $this->pos; + $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } + else { +- $result = $res_368; +- $this->pos = $pos_368; +- unset( $res_368 ); +- unset( $pos_368 ); ++ $result = $res_383; ++ $this->pos = $pos_383; ++ unset( $res_383 ); ++ unset( $pos_383 ); + } + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } ++ else { $_400 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } +- $_381 = NULL; ++ else { $_400 = FALSE; break; } ++ $_396 = NULL; + do { +- $_379 = NULL; ++ $_394 = NULL; + do { +- $res_372 = $result; +- $pos_372 = $this->pos; ++ $res_387 = $result; ++ $pos_387 = $this->pos; + if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_379 = TRUE; break; ++ $_394 = TRUE; break; + } +- $result = $res_372; +- $this->pos = $pos_372; +- $_377 = NULL; ++ $result = $res_387; ++ $this->pos = $pos_387; ++ $_392 = NULL; + do { +- $res_374 = $result; +- $pos_374 = $this->pos; ++ $res_389 = $result; ++ $pos_389 = $this->pos; + if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_377 = TRUE; break; ++ $_392 = TRUE; break; + } +- $result = $res_374; +- $this->pos = $pos_374; ++ $result = $res_389; ++ $this->pos = $pos_389; + if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_377 = TRUE; break; ++ $_392 = TRUE; break; + } +- $result = $res_374; +- $this->pos = $pos_374; +- $_377 = FALSE; break; ++ $result = $res_389; ++ $this->pos = $pos_389; ++ $_392 = FALSE; break; + } + while(0); +- if( $_377 === TRUE ) { $_379 = TRUE; break; } +- $result = $res_372; +- $this->pos = $pos_372; +- $_379 = FALSE; break; ++ if( $_392 === TRUE ) { $_394 = TRUE; break; } ++ $result = $res_387; ++ $this->pos = $pos_387; ++ $_394 = FALSE; break; + } + while(0); +- if( $_379 === FALSE) { $_381 = FALSE; break; } +- $_381 = TRUE; break; ++ if( $_394 === FALSE) { $_396 = FALSE; break; } ++ $_396 = TRUE; break; + } + while(0); +- if( $_381 === FALSE) { $_385 = FALSE; break; } ++ if( $_396 === FALSE) { $_400 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_385 = FALSE; break; } +- $_385 = TRUE; break; ++ else { $_400 = FALSE; break; } ++ $_400 = TRUE; break; + } + while(0); +- if( $_385 === TRUE ) { return $this->finalise($result); } +- if( $_385 === FALSE) { return FALSE; } ++ if( $_400 === TRUE ) { return $this->finalise($result); } ++ if( $_400 === FALSE) { return FALSE; } + } + + +@@ -2494,246 +2580,266 @@ function UncachedBlock_Template(&$res, $sub) + } + + /* CacheRestrictedTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | +- OpenBlock | MalformedBlock | Injection | Text)+ */ ++ OpenBlock | MalformedBlock | MalformedBracketInjection | Injection | Text)+ */ + protected $match_CacheRestrictedTemplate_typestack = array('CacheRestrictedTemplate','Template'); + function match_CacheRestrictedTemplate ($stack = array()) { + $matchrule = ""CacheRestrictedTemplate""; $result = $this->construct($matchrule, $matchrule, null); + $count = 0; + while (true) { +- $res_437 = $result; +- $pos_437 = $this->pos; +- $_436 = NULL; ++ $res_456 = $result; ++ $pos_456 = $this->pos; ++ $_455 = NULL; + do { +- $_434 = NULL; ++ $_453 = NULL; + do { +- $res_387 = $result; +- $pos_387 = $this->pos; ++ $res_402 = $result; ++ $pos_402 = $this->pos; + $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_434 = TRUE; break; ++ $_453 = TRUE; break; + } +- $result = $res_387; +- $this->pos = $pos_387; +- $_432 = NULL; ++ $result = $res_402; ++ $this->pos = $pos_402; ++ $_451 = NULL; + do { +- $res_389 = $result; +- $pos_389 = $this->pos; ++ $res_404 = $result; ++ $pos_404 = $this->pos; + $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_432 = TRUE; break; ++ $_451 = TRUE; break; + } +- $result = $res_389; +- $this->pos = $pos_389; +- $_430 = NULL; ++ $result = $res_404; ++ $this->pos = $pos_404; ++ $_449 = NULL; + do { +- $res_391 = $result; +- $pos_391 = $this->pos; ++ $res_406 = $result; ++ $pos_406 = $this->pos; + $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_430 = TRUE; break; ++ $_449 = TRUE; break; + } +- $result = $res_391; +- $this->pos = $pos_391; +- $_428 = NULL; ++ $result = $res_406; ++ $this->pos = $pos_406; ++ $_447 = NULL; + do { +- $res_393 = $result; +- $pos_393 = $this->pos; ++ $res_408 = $result; ++ $pos_408 = $this->pos; + $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_428 = TRUE; break; ++ $_447 = TRUE; break; + } +- $result = $res_393; +- $this->pos = $pos_393; +- $_426 = NULL; ++ $result = $res_408; ++ $this->pos = $pos_408; ++ $_445 = NULL; + do { +- $res_395 = $result; +- $pos_395 = $this->pos; ++ $res_410 = $result; ++ $pos_410 = $this->pos; + $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_426 = TRUE; break; ++ $_445 = TRUE; break; + } +- $result = $res_395; +- $this->pos = $pos_395; +- $_424 = NULL; ++ $result = $res_410; ++ $this->pos = $pos_410; ++ $_443 = NULL; + do { +- $res_397 = $result; +- $pos_397 = $this->pos; ++ $res_412 = $result; ++ $pos_412 = $this->pos; + $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_424 = TRUE; break; ++ $_443 = TRUE; break; + } +- $result = $res_397; +- $this->pos = $pos_397; +- $_422 = NULL; ++ $result = $res_412; ++ $this->pos = $pos_412; ++ $_441 = NULL; + do { +- $res_399 = $result; +- $pos_399 = $this->pos; ++ $res_414 = $result; ++ $pos_414 = $this->pos; + $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_422 = TRUE; break; ++ $_441 = TRUE; break; + } +- $result = $res_399; +- $this->pos = $pos_399; +- $_420 = NULL; ++ $result = $res_414; ++ $this->pos = $pos_414; ++ $_439 = NULL; + do { +- $res_401 = $result; +- $pos_401 = $this->pos; ++ $res_416 = $result; ++ $pos_416 = $this->pos; + $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_420 = TRUE; break; ++ $_439 = TRUE; break; + } +- $result = $res_401; +- $this->pos = $pos_401; +- $_418 = NULL; ++ $result = $res_416; ++ $this->pos = $pos_416; ++ $_437 = NULL; + do { +- $res_403 = $result; +- $pos_403 = $this->pos; ++ $res_418 = $result; ++ $pos_418 = $this->pos; + $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_418 = TRUE; break; ++ $_437 = TRUE; break; + } +- $result = $res_403; +- $this->pos = $pos_403; +- $_416 = NULL; ++ $result = $res_418; ++ $this->pos = $pos_418; ++ $_435 = NULL; + do { +- $res_405 = $result; +- $pos_405 = $this->pos; ++ $res_420 = $result; ++ $pos_420 = $this->pos; + $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_416 = TRUE; break; ++ $_435 = TRUE; break; + } +- $result = $res_405; +- $this->pos = $pos_405; +- $_414 = NULL; ++ $result = $res_420; ++ $this->pos = $pos_420; ++ $_433 = NULL; + do { +- $res_407 = $result; +- $pos_407 = $this->pos; ++ $res_422 = $result; ++ $pos_422 = $this->pos; + $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_414 = TRUE; break; ++ $_433 = TRUE; break; + } +- $result = $res_407; +- $this->pos = $pos_407; +- $_412 = NULL; ++ $result = $res_422; ++ $this->pos = $pos_422; ++ $_431 = NULL; + do { +- $res_409 = $result; +- $pos_409 = $this->pos; +- $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $res_424 = $result; ++ $pos_424 = $this->pos; ++ $matcher = 'match_'.'MalformedBracketInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_412 = TRUE; break; ++ $_431 = TRUE; break; + } +- $result = $res_409; +- $this->pos = $pos_409; +- $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; +- $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); +- if ($subres !== FALSE) { +- $this->store( $result, $subres ); +- $_412 = TRUE; break; ++ $result = $res_424; ++ $this->pos = $pos_424; ++ $_429 = NULL; ++ do { ++ $res_426 = $result; ++ $pos_426 = $this->pos; ++ $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_429 = TRUE; break; ++ } ++ $result = $res_426; ++ $this->pos = $pos_426; ++ $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_429 = TRUE; break; ++ } ++ $result = $res_426; ++ $this->pos = $pos_426; ++ $_429 = FALSE; break; + } +- $result = $res_409; +- $this->pos = $pos_409; +- $_412 = FALSE; break; ++ while(0); ++ if( $_429 === TRUE ) { ++ $_431 = TRUE; break; ++ } ++ $result = $res_424; ++ $this->pos = $pos_424; ++ $_431 = FALSE; break; + } + while(0); +- if( $_412 === TRUE ) { $_414 = TRUE; break; } +- $result = $res_407; +- $this->pos = $pos_407; +- $_414 = FALSE; break; ++ if( $_431 === TRUE ) { $_433 = TRUE; break; } ++ $result = $res_422; ++ $this->pos = $pos_422; ++ $_433 = FALSE; break; + } + while(0); +- if( $_414 === TRUE ) { $_416 = TRUE; break; } +- $result = $res_405; +- $this->pos = $pos_405; +- $_416 = FALSE; break; ++ if( $_433 === TRUE ) { $_435 = TRUE; break; } ++ $result = $res_420; ++ $this->pos = $pos_420; ++ $_435 = FALSE; break; + } + while(0); +- if( $_416 === TRUE ) { $_418 = TRUE; break; } +- $result = $res_403; +- $this->pos = $pos_403; +- $_418 = FALSE; break; ++ if( $_435 === TRUE ) { $_437 = TRUE; break; } ++ $result = $res_418; ++ $this->pos = $pos_418; ++ $_437 = FALSE; break; + } + while(0); +- if( $_418 === TRUE ) { $_420 = TRUE; break; } +- $result = $res_401; +- $this->pos = $pos_401; +- $_420 = FALSE; break; ++ if( $_437 === TRUE ) { $_439 = TRUE; break; } ++ $result = $res_416; ++ $this->pos = $pos_416; ++ $_439 = FALSE; break; + } + while(0); +- if( $_420 === TRUE ) { $_422 = TRUE; break; } +- $result = $res_399; +- $this->pos = $pos_399; +- $_422 = FALSE; break; ++ if( $_439 === TRUE ) { $_441 = TRUE; break; } ++ $result = $res_414; ++ $this->pos = $pos_414; ++ $_441 = FALSE; break; + } + while(0); +- if( $_422 === TRUE ) { $_424 = TRUE; break; } +- $result = $res_397; +- $this->pos = $pos_397; +- $_424 = FALSE; break; ++ if( $_441 === TRUE ) { $_443 = TRUE; break; } ++ $result = $res_412; ++ $this->pos = $pos_412; ++ $_443 = FALSE; break; + } + while(0); +- if( $_424 === TRUE ) { $_426 = TRUE; break; } +- $result = $res_395; +- $this->pos = $pos_395; +- $_426 = FALSE; break; ++ if( $_443 === TRUE ) { $_445 = TRUE; break; } ++ $result = $res_410; ++ $this->pos = $pos_410; ++ $_445 = FALSE; break; + } + while(0); +- if( $_426 === TRUE ) { $_428 = TRUE; break; } +- $result = $res_393; +- $this->pos = $pos_393; +- $_428 = FALSE; break; ++ if( $_445 === TRUE ) { $_447 = TRUE; break; } ++ $result = $res_408; ++ $this->pos = $pos_408; ++ $_447 = FALSE; break; + } + while(0); +- if( $_428 === TRUE ) { $_430 = TRUE; break; } +- $result = $res_391; +- $this->pos = $pos_391; +- $_430 = FALSE; break; ++ if( $_447 === TRUE ) { $_449 = TRUE; break; } ++ $result = $res_406; ++ $this->pos = $pos_406; ++ $_449 = FALSE; break; + } + while(0); +- if( $_430 === TRUE ) { $_432 = TRUE; break; } +- $result = $res_389; +- $this->pos = $pos_389; +- $_432 = FALSE; break; ++ if( $_449 === TRUE ) { $_451 = TRUE; break; } ++ $result = $res_404; ++ $this->pos = $pos_404; ++ $_451 = FALSE; break; + } + while(0); +- if( $_432 === TRUE ) { $_434 = TRUE; break; } +- $result = $res_387; +- $this->pos = $pos_387; +- $_434 = FALSE; break; ++ if( $_451 === TRUE ) { $_453 = TRUE; break; } ++ $result = $res_402; ++ $this->pos = $pos_402; ++ $_453 = FALSE; break; + } + while(0); +- if( $_434 === FALSE) { $_436 = FALSE; break; } +- $_436 = TRUE; break; ++ if( $_453 === FALSE) { $_455 = FALSE; break; } ++ $_455 = TRUE; break; + } + while(0); +- if( $_436 === FALSE) { +- $result = $res_437; +- $this->pos = $pos_437; +- unset( $res_437 ); +- unset( $pos_437 ); ++ if( $_455 === FALSE) { ++ $result = $res_456; ++ $this->pos = $pos_456; ++ unset( $res_456 ); ++ unset( $pos_456 ); + break; + } + $count += 1; +@@ -2764,103 +2870,103 @@ function CacheRestrictedTemplate_UncachedBlock(&$res, $sub) + protected $match_CacheBlock_typestack = array('CacheBlock'); + function match_CacheBlock ($stack = array()) { + $matchrule = ""CacheBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_492 = NULL; ++ $_511 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_492 = FALSE; break; } ++ else { $_511 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $stack[] = $result; $result = $this->construct( $matchrule, ""CacheTag"" ); +- $_445 = NULL; ++ $_464 = NULL; + do { +- $_443 = NULL; ++ $_462 = NULL; + do { +- $res_440 = $result; +- $pos_440 = $this->pos; ++ $res_459 = $result; ++ $pos_459 = $this->pos; + if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_443 = TRUE; break; ++ $_462 = TRUE; break; + } +- $result = $res_440; +- $this->pos = $pos_440; ++ $result = $res_459; ++ $this->pos = $pos_459; + if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_443 = TRUE; break; ++ $_462 = TRUE; break; + } +- $result = $res_440; +- $this->pos = $pos_440; +- $_443 = FALSE; break; ++ $result = $res_459; ++ $this->pos = $pos_459; ++ $_462 = FALSE; break; + } + while(0); +- if( $_443 === FALSE) { $_445 = FALSE; break; } +- $_445 = TRUE; break; ++ if( $_462 === FALSE) { $_464 = FALSE; break; } ++ $_464 = TRUE; break; + } + while(0); +- if( $_445 === TRUE ) { ++ if( $_464 === TRUE ) { + $subres = $result; $result = array_pop($stack); + $this->store( $result, $subres, 'CacheTag' ); + } +- if( $_445 === FALSE) { ++ if( $_464 === FALSE) { + $result = array_pop($stack); +- $_492 = FALSE; break; ++ $_511 = FALSE; break; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_450 = $result; +- $pos_450 = $this->pos; +- $_449 = NULL; ++ $res_469 = $result; ++ $pos_469 = $this->pos; ++ $_468 = NULL; + do { + $matcher = 'match_'.'CacheBlockArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_449 = FALSE; break; } +- $_449 = TRUE; break; ++ else { $_468 = FALSE; break; } ++ $_468 = TRUE; break; + } + while(0); +- if( $_449 === FALSE) { +- $result = $res_450; +- $this->pos = $pos_450; +- unset( $res_450 ); +- unset( $pos_450 ); +- } +- $res_462 = $result; +- $pos_462 = $this->pos; +- $_461 = NULL; ++ if( $_468 === FALSE) { ++ $result = $res_469; ++ $this->pos = $pos_469; ++ unset( $res_469 ); ++ unset( $pos_469 ); ++ } ++ $res_481 = $result; ++ $pos_481 = $this->pos; ++ $_480 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $stack[] = $result; $result = $this->construct( $matchrule, ""Conditional"" ); +- $_457 = NULL; ++ $_476 = NULL; + do { +- $_455 = NULL; ++ $_474 = NULL; + do { +- $res_452 = $result; +- $pos_452 = $this->pos; ++ $res_471 = $result; ++ $pos_471 = $this->pos; + if (( $subres = $this->literal( 'if' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_455 = TRUE; break; ++ $_474 = TRUE; break; + } +- $result = $res_452; +- $this->pos = $pos_452; ++ $result = $res_471; ++ $this->pos = $pos_471; + if (( $subres = $this->literal( 'unless' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_455 = TRUE; break; ++ $_474 = TRUE; break; + } +- $result = $res_452; +- $this->pos = $pos_452; +- $_455 = FALSE; break; ++ $result = $res_471; ++ $this->pos = $pos_471; ++ $_474 = FALSE; break; + } + while(0); +- if( $_455 === FALSE) { $_457 = FALSE; break; } +- $_457 = TRUE; break; ++ if( $_474 === FALSE) { $_476 = FALSE; break; } ++ $_476 = TRUE; break; + } + while(0); +- if( $_457 === TRUE ) { ++ if( $_476 === TRUE ) { + $subres = $result; $result = array_pop($stack); + $this->store( $result, $subres, 'Conditional' ); + } +- if( $_457 === FALSE) { ++ if( $_476 === FALSE) { + $result = array_pop($stack); +- $_461 = FALSE; break; ++ $_480 = FALSE; break; + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos; +@@ -2868,132 +2974,132 @@ function match_CacheBlock ($stack = array()) { + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Condition"" ); + } +- else { $_461 = FALSE; break; } +- $_461 = TRUE; break; ++ else { $_480 = FALSE; break; } ++ $_480 = TRUE; break; + } + while(0); +- if( $_461 === FALSE) { +- $result = $res_462; +- $this->pos = $pos_462; +- unset( $res_462 ); +- unset( $pos_462 ); ++ if( $_480 === FALSE) { ++ $result = $res_481; ++ $this->pos = $pos_481; ++ unset( $res_481 ); ++ unset( $pos_481 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_492 = FALSE; break; } ++ else { $_511 = FALSE; break; } + while (true) { +- $res_475 = $result; +- $pos_475 = $this->pos; +- $_474 = NULL; ++ $res_494 = $result; ++ $pos_494 = $this->pos; ++ $_493 = NULL; + do { +- $_472 = NULL; ++ $_491 = NULL; + do { +- $res_465 = $result; +- $pos_465 = $this->pos; ++ $res_484 = $result; ++ $pos_484 = $this->pos; + $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_472 = TRUE; break; ++ $_491 = TRUE; break; + } +- $result = $res_465; +- $this->pos = $pos_465; +- $_470 = NULL; ++ $result = $res_484; ++ $this->pos = $pos_484; ++ $_489 = NULL; + do { +- $res_467 = $result; +- $pos_467 = $this->pos; ++ $res_486 = $result; ++ $pos_486 = $this->pos; + $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_470 = TRUE; break; ++ $_489 = TRUE; break; + } +- $result = $res_467; +- $this->pos = $pos_467; ++ $result = $res_486; ++ $this->pos = $pos_486; + $matcher = 'match_'.'CacheBlockTemplate'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_470 = TRUE; break; ++ $_489 = TRUE; break; + } +- $result = $res_467; +- $this->pos = $pos_467; +- $_470 = FALSE; break; ++ $result = $res_486; ++ $this->pos = $pos_486; ++ $_489 = FALSE; break; + } + while(0); +- if( $_470 === TRUE ) { $_472 = TRUE; break; } +- $result = $res_465; +- $this->pos = $pos_465; +- $_472 = FALSE; break; ++ if( $_489 === TRUE ) { $_491 = TRUE; break; } ++ $result = $res_484; ++ $this->pos = $pos_484; ++ $_491 = FALSE; break; + } + while(0); +- if( $_472 === FALSE) { $_474 = FALSE; break; } +- $_474 = TRUE; break; ++ if( $_491 === FALSE) { $_493 = FALSE; break; } ++ $_493 = TRUE; break; + } + while(0); +- if( $_474 === FALSE) { +- $result = $res_475; +- $this->pos = $pos_475; +- unset( $res_475 ); +- unset( $pos_475 ); ++ if( $_493 === FALSE) { ++ $result = $res_494; ++ $this->pos = $pos_494; ++ unset( $res_494 ); ++ unset( $pos_494 ); + break; + } + } + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_492 = FALSE; break; } ++ else { $_511 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_492 = FALSE; break; } +- $_488 = NULL; ++ else { $_511 = FALSE; break; } ++ $_507 = NULL; + do { +- $_486 = NULL; ++ $_505 = NULL; + do { +- $res_479 = $result; +- $pos_479 = $this->pos; ++ $res_498 = $result; ++ $pos_498 = $this->pos; + if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_486 = TRUE; break; ++ $_505 = TRUE; break; + } +- $result = $res_479; +- $this->pos = $pos_479; +- $_484 = NULL; ++ $result = $res_498; ++ $this->pos = $pos_498; ++ $_503 = NULL; + do { +- $res_481 = $result; +- $pos_481 = $this->pos; ++ $res_500 = $result; ++ $pos_500 = $this->pos; + if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_484 = TRUE; break; ++ $_503 = TRUE; break; + } +- $result = $res_481; +- $this->pos = $pos_481; ++ $result = $res_500; ++ $this->pos = $pos_500; + if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_484 = TRUE; break; ++ $_503 = TRUE; break; + } +- $result = $res_481; +- $this->pos = $pos_481; +- $_484 = FALSE; break; ++ $result = $res_500; ++ $this->pos = $pos_500; ++ $_503 = FALSE; break; + } + while(0); +- if( $_484 === TRUE ) { $_486 = TRUE; break; } +- $result = $res_479; +- $this->pos = $pos_479; +- $_486 = FALSE; break; ++ if( $_503 === TRUE ) { $_505 = TRUE; break; } ++ $result = $res_498; ++ $this->pos = $pos_498; ++ $_505 = FALSE; break; + } + while(0); +- if( $_486 === FALSE) { $_488 = FALSE; break; } +- $_488 = TRUE; break; ++ if( $_505 === FALSE) { $_507 = FALSE; break; } ++ $_507 = TRUE; break; + } + while(0); +- if( $_488 === FALSE) { $_492 = FALSE; break; } ++ if( $_507 === FALSE) { $_511 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_492 = FALSE; break; } +- $_492 = TRUE; break; ++ else { $_511 = FALSE; break; } ++ $_511 = TRUE; break; + } + while(0); +- if( $_492 === TRUE ) { return $this->finalise($result); } +- if( $_492 === FALSE) { return FALSE; } ++ if( $_511 === TRUE ) { return $this->finalise($result); } ++ if( $_511 === FALSE) { return FALSE; } + } + + +@@ -3062,109 +3168,109 @@ function CacheBlock_CacheBlockTemplate(&$res, $sub) + protected $match_OldTPart_typestack = array('OldTPart'); + function match_OldTPart ($stack = array()) { + $matchrule = ""OldTPart""; $result = $this->construct($matchrule, $matchrule, null); +- $_511 = NULL; ++ $_530 = NULL; + do { + if (( $subres = $this->literal( '_t' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '(') { + $this->pos += 1; + $result[""text""] .= '('; + } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + $matcher = 'match_'.'QuotedString'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_511 = FALSE; break; } +- $res_504 = $result; +- $pos_504 = $this->pos; +- $_503 = NULL; ++ else { $_530 = FALSE; break; } ++ $res_523 = $result; ++ $pos_523 = $this->pos; ++ $_522 = NULL; + do { + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_503 = FALSE; break; } ++ else { $_522 = FALSE; break; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_503 = FALSE; break; } ++ else { $_522 = FALSE; break; } + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_503 = FALSE; break; } ++ else { $_522 = FALSE; break; } + $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_503 = FALSE; break; } +- $_503 = TRUE; break; ++ else { $_522 = FALSE; break; } ++ $_522 = TRUE; break; + } + while(0); +- if( $_503 === FALSE) { +- $result = $res_504; +- $this->pos = $pos_504; +- unset( $res_504 ); +- unset( $pos_504 ); ++ if( $_522 === FALSE) { ++ $result = $res_523; ++ $this->pos = $pos_523; ++ unset( $res_523 ); ++ unset( $pos_523 ); + } + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + if (substr($this->string,$this->pos,1) == ')') { + $this->pos += 1; + $result[""text""] .= ')'; + } +- else { $_511 = FALSE; break; } ++ else { $_530 = FALSE; break; } + $matcher = 'match_'.'N'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_511 = FALSE; break; } +- $res_510 = $result; +- $pos_510 = $this->pos; +- $_509 = NULL; ++ else { $_530 = FALSE; break; } ++ $res_529 = $result; ++ $pos_529 = $this->pos; ++ $_528 = NULL; + do { + if (substr($this->string,$this->pos,1) == ';') { + $this->pos += 1; + $result[""text""] .= ';'; + } +- else { $_509 = FALSE; break; } +- $_509 = TRUE; break; ++ else { $_528 = FALSE; break; } ++ $_528 = TRUE; break; + } + while(0); +- if( $_509 === FALSE) { +- $result = $res_510; +- $this->pos = $pos_510; +- unset( $res_510 ); +- unset( $pos_510 ); ++ if( $_528 === FALSE) { ++ $result = $res_529; ++ $this->pos = $pos_529; ++ unset( $res_529 ); ++ unset( $pos_529 ); + } +- $_511 = TRUE; break; ++ $_530 = TRUE; break; + } + while(0); +- if( $_511 === TRUE ) { return $this->finalise($result); } +- if( $_511 === FALSE) { return FALSE; } ++ if( $_530 === TRUE ) { return $this->finalise($result); } ++ if( $_530 === FALSE) { return FALSE; } + } + + +@@ -3210,25 +3316,25 @@ function OldTPart__finalise(&$res) + protected $match_OldTTag_typestack = array('OldTTag'); + function match_OldTTag ($stack = array()) { + $matchrule = ""OldTTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_519 = NULL; ++ $_538 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_519 = FALSE; break; } ++ else { $_538 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_519 = FALSE; break; } ++ else { $_538 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_519 = FALSE; break; } +- $_519 = TRUE; break; ++ else { $_538 = FALSE; break; } ++ $_538 = TRUE; break; + } + while(0); +- if( $_519 === TRUE ) { return $this->finalise($result); } +- if( $_519 === FALSE) { return FALSE; } ++ if( $_538 === TRUE ) { return $this->finalise($result); } ++ if( $_538 === FALSE) { return FALSE; } + } + + +@@ -3242,53 +3348,53 @@ function OldTTag_OldTPart(&$res, $sub) + protected $match_OldSprintfTag_typestack = array('OldSprintfTag'); + function match_OldSprintfTag ($stack = array()) { + $matchrule = ""OldSprintfTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_536 = NULL; ++ $_555 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'sprintf' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == '(') { + $this->pos += 1; + $result[""text""] .= '('; + } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'OldTPart'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'CallArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ')') { + $this->pos += 1; + $result[""text""] .= ')'; + } +- else { $_536 = FALSE; break; } ++ else { $_555 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_536 = FALSE; break; } +- $_536 = TRUE; break; ++ else { $_555 = FALSE; break; } ++ $_555 = TRUE; break; + } + while(0); +- if( $_536 === TRUE ) { return $this->finalise($result); } +- if( $_536 === FALSE) { return FALSE; } ++ if( $_555 === TRUE ) { return $this->finalise($result); } ++ if( $_555 === FALSE) { return FALSE; } + } + + +@@ -3312,31 +3418,31 @@ function OldSprintfTag_CallArguments(&$res, $sub) + protected $match_OldI18NTag_typestack = array('OldI18NTag'); + function match_OldI18NTag ($stack = array()) { + $matchrule = ""OldI18NTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_541 = NULL; ++ $_560 = NULL; + do { +- $res_538 = $result; +- $pos_538 = $this->pos; ++ $res_557 = $result; ++ $pos_557 = $this->pos; + $matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_541 = TRUE; break; ++ $_560 = TRUE; break; + } +- $result = $res_538; +- $this->pos = $pos_538; ++ $result = $res_557; ++ $this->pos = $pos_557; + $matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_541 = TRUE; break; ++ $_560 = TRUE; break; + } +- $result = $res_538; +- $this->pos = $pos_538; +- $_541 = FALSE; break; ++ $result = $res_557; ++ $this->pos = $pos_557; ++ $_560 = FALSE; break; + } + while(0); +- if( $_541 === TRUE ) { return $this->finalise($result); } +- if( $_541 === FALSE) { return FALSE; } ++ if( $_560 === TRUE ) { return $this->finalise($result); } ++ if( $_560 === FALSE) { return FALSE; } + } + + +@@ -3350,30 +3456,30 @@ function OldI18NTag_STR(&$res, $sub) + protected $match_NamedArgument_typestack = array('NamedArgument'); + function match_NamedArgument ($stack = array()) { + $matchrule = ""NamedArgument""; $result = $this->construct($matchrule, $matchrule, null); +- $_546 = NULL; ++ $_565 = NULL; + do { + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Name"" ); + } +- else { $_546 = FALSE; break; } ++ else { $_565 = FALSE; break; } + if (substr($this->string,$this->pos,1) == '=') { + $this->pos += 1; + $result[""text""] .= '='; + } +- else { $_546 = FALSE; break; } ++ else { $_565 = FALSE; break; } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Value"" ); + } +- else { $_546 = FALSE; break; } +- $_546 = TRUE; break; ++ else { $_565 = FALSE; break; } ++ $_565 = TRUE; break; + } + while(0); +- if( $_546 === TRUE ) { return $this->finalise($result); } +- if( $_546 === FALSE) { return FALSE; } ++ if( $_565 === TRUE ) { return $this->finalise($result); } ++ if( $_565 === FALSE) { return FALSE; } + } + + +@@ -3404,77 +3510,77 @@ function NamedArgument_Value(&$res, $sub) + protected $match_Include_typestack = array('Include'); + function match_Include ($stack = array()) { + $matchrule = ""Include""; $result = $this->construct($matchrule, $matchrule, null); +- $_565 = NULL; ++ $_584 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_565 = FALSE; break; } ++ else { $_584 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'include' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_565 = FALSE; break; } ++ else { $_584 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'NamespacedWord'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } +- else { $_565 = FALSE; break; } ++ else { $_584 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_562 = $result; +- $pos_562 = $this->pos; +- $_561 = NULL; ++ $res_581 = $result; ++ $pos_581 = $this->pos; ++ $_580 = NULL; + do { + $matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_561 = FALSE; break; } ++ else { $_580 = FALSE; break; } + while (true) { +- $res_560 = $result; +- $pos_560 = $this->pos; +- $_559 = NULL; ++ $res_579 = $result; ++ $pos_579 = $this->pos; ++ $_578 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_559 = FALSE; break; } ++ else { $_578 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'NamedArgument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); + } +- else { $_559 = FALSE; break; } +- $_559 = TRUE; break; ++ else { $_578 = FALSE; break; } ++ $_578 = TRUE; break; + } + while(0); +- if( $_559 === FALSE) { +- $result = $res_560; +- $this->pos = $pos_560; +- unset( $res_560 ); +- unset( $pos_560 ); ++ if( $_578 === FALSE) { ++ $result = $res_579; ++ $this->pos = $pos_579; ++ unset( $res_579 ); ++ unset( $pos_579 ); + break; + } + } +- $_561 = TRUE; break; ++ $_580 = TRUE; break; + } + while(0); +- if( $_561 === FALSE) { +- $result = $res_562; +- $this->pos = $pos_562; +- unset( $res_562 ); +- unset( $pos_562 ); ++ if( $_580 === FALSE) { ++ $result = $res_581; ++ $this->pos = $pos_581; ++ unset( $res_581 ); ++ unset( $pos_581 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_565 = FALSE; break; } +- $_565 = TRUE; break; ++ else { $_584 = FALSE; break; } ++ $_584 = TRUE; break; + } + while(0); +- if( $_565 === TRUE ) { return $this->finalise($result); } +- if( $_565 === FALSE) { return FALSE; } ++ if( $_584 === TRUE ) { return $this->finalise($result); } ++ if( $_584 === FALSE) { return FALSE; } + } + + +@@ -3515,48 +3621,48 @@ function Include__finalise(&$res) + protected $match_BlockArguments_typestack = array('BlockArguments'); + function match_BlockArguments ($stack = array()) { + $matchrule = ""BlockArguments""; $result = $this->construct($matchrule, $matchrule, null); +- $_574 = NULL; ++ $_593 = NULL; + do { + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Argument"" ); + } +- else { $_574 = FALSE; break; } ++ else { $_593 = FALSE; break; } + while (true) { +- $res_573 = $result; +- $pos_573 = $this->pos; +- $_572 = NULL; ++ $res_592 = $result; ++ $pos_592 = $this->pos; ++ $_591 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (substr($this->string,$this->pos,1) == ',') { + $this->pos += 1; + $result[""text""] .= ','; + } +- else { $_572 = FALSE; break; } ++ else { $_591 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $matcher = 'match_'.'Argument'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Argument"" ); + } +- else { $_572 = FALSE; break; } +- $_572 = TRUE; break; ++ else { $_591 = FALSE; break; } ++ $_591 = TRUE; break; + } + while(0); +- if( $_572 === FALSE) { +- $result = $res_573; +- $this->pos = $pos_573; +- unset( $res_573 ); +- unset( $pos_573 ); ++ if( $_591 === FALSE) { ++ $result = $res_592; ++ $this->pos = $pos_592; ++ unset( $res_592 ); ++ unset( $pos_592 ); + break; + } + } +- $_574 = TRUE; break; ++ $_593 = TRUE; break; + } + while(0); +- if( $_574 === TRUE ) { return $this->finalise($result); } +- if( $_574 === FALSE) { return FALSE; } ++ if( $_593 === TRUE ) { return $this->finalise($result); } ++ if( $_593 === FALSE) { return FALSE; } + } + + +@@ -3564,153 +3670,153 @@ function match_BlockArguments ($stack = array()) { + protected $match_NotBlockTag_typestack = array('NotBlockTag'); + function match_NotBlockTag ($stack = array()) { + $matchrule = ""NotBlockTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_612 = NULL; ++ $_631 = NULL; + do { +- $res_576 = $result; +- $pos_576 = $this->pos; ++ $res_595 = $result; ++ $pos_595 = $this->pos; + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_612 = TRUE; break; ++ $_631 = TRUE; break; + } +- $result = $res_576; +- $this->pos = $pos_576; +- $_610 = NULL; ++ $result = $res_595; ++ $this->pos = $pos_595; ++ $_629 = NULL; + do { +- $_607 = NULL; ++ $_626 = NULL; + do { +- $_605 = NULL; ++ $_624 = NULL; + do { +- $res_578 = $result; +- $pos_578 = $this->pos; ++ $res_597 = $result; ++ $pos_597 = $this->pos; + if (( $subres = $this->literal( 'if' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_605 = TRUE; break; ++ $_624 = TRUE; break; + } +- $result = $res_578; +- $this->pos = $pos_578; +- $_603 = NULL; ++ $result = $res_597; ++ $this->pos = $pos_597; ++ $_622 = NULL; + do { +- $res_580 = $result; +- $pos_580 = $this->pos; ++ $res_599 = $result; ++ $pos_599 = $this->pos; + if (( $subres = $this->literal( 'else_if' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_603 = TRUE; break; ++ $_622 = TRUE; break; + } +- $result = $res_580; +- $this->pos = $pos_580; +- $_601 = NULL; ++ $result = $res_599; ++ $this->pos = $pos_599; ++ $_620 = NULL; + do { +- $res_582 = $result; +- $pos_582 = $this->pos; ++ $res_601 = $result; ++ $pos_601 = $this->pos; + if (( $subres = $this->literal( 'else' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_601 = TRUE; break; ++ $_620 = TRUE; break; + } +- $result = $res_582; +- $this->pos = $pos_582; +- $_599 = NULL; ++ $result = $res_601; ++ $this->pos = $pos_601; ++ $_618 = NULL; + do { +- $res_584 = $result; +- $pos_584 = $this->pos; ++ $res_603 = $result; ++ $pos_603 = $this->pos; + if (( $subres = $this->literal( 'require' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_599 = TRUE; break; ++ $_618 = TRUE; break; + } +- $result = $res_584; +- $this->pos = $pos_584; +- $_597 = NULL; ++ $result = $res_603; ++ $this->pos = $pos_603; ++ $_616 = NULL; + do { +- $res_586 = $result; +- $pos_586 = $this->pos; ++ $res_605 = $result; ++ $pos_605 = $this->pos; + if (( $subres = $this->literal( 'cached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_597 = TRUE; break; ++ $_616 = TRUE; break; + } +- $result = $res_586; +- $this->pos = $pos_586; +- $_595 = NULL; ++ $result = $res_605; ++ $this->pos = $pos_605; ++ $_614 = NULL; + do { +- $res_588 = $result; +- $pos_588 = $this->pos; ++ $res_607 = $result; ++ $pos_607 = $this->pos; + if (( $subres = $this->literal( 'uncached' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_595 = TRUE; break; ++ $_614 = TRUE; break; + } +- $result = $res_588; +- $this->pos = $pos_588; +- $_593 = NULL; ++ $result = $res_607; ++ $this->pos = $pos_607; ++ $_612 = NULL; + do { +- $res_590 = $result; +- $pos_590 = $this->pos; ++ $res_609 = $result; ++ $pos_609 = $this->pos; + if (( $subres = $this->literal( 'cacheblock' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_593 = TRUE; break; ++ $_612 = TRUE; break; + } +- $result = $res_590; +- $this->pos = $pos_590; ++ $result = $res_609; ++ $this->pos = $pos_609; + if (( $subres = $this->literal( 'include' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_593 = TRUE; break; ++ $_612 = TRUE; break; + } +- $result = $res_590; +- $this->pos = $pos_590; +- $_593 = FALSE; break; ++ $result = $res_609; ++ $this->pos = $pos_609; ++ $_612 = FALSE; break; + } + while(0); +- if( $_593 === TRUE ) { $_595 = TRUE; break; } +- $result = $res_588; +- $this->pos = $pos_588; +- $_595 = FALSE; break; ++ if( $_612 === TRUE ) { $_614 = TRUE; break; } ++ $result = $res_607; ++ $this->pos = $pos_607; ++ $_614 = FALSE; break; + } + while(0); +- if( $_595 === TRUE ) { $_597 = TRUE; break; } +- $result = $res_586; +- $this->pos = $pos_586; +- $_597 = FALSE; break; ++ if( $_614 === TRUE ) { $_616 = TRUE; break; } ++ $result = $res_605; ++ $this->pos = $pos_605; ++ $_616 = FALSE; break; + } + while(0); +- if( $_597 === TRUE ) { $_599 = TRUE; break; } +- $result = $res_584; +- $this->pos = $pos_584; +- $_599 = FALSE; break; ++ if( $_616 === TRUE ) { $_618 = TRUE; break; } ++ $result = $res_603; ++ $this->pos = $pos_603; ++ $_618 = FALSE; break; + } + while(0); +- if( $_599 === TRUE ) { $_601 = TRUE; break; } +- $result = $res_582; +- $this->pos = $pos_582; +- $_601 = FALSE; break; ++ if( $_618 === TRUE ) { $_620 = TRUE; break; } ++ $result = $res_601; ++ $this->pos = $pos_601; ++ $_620 = FALSE; break; + } + while(0); +- if( $_601 === TRUE ) { $_603 = TRUE; break; } +- $result = $res_580; +- $this->pos = $pos_580; +- $_603 = FALSE; break; ++ if( $_620 === TRUE ) { $_622 = TRUE; break; } ++ $result = $res_599; ++ $this->pos = $pos_599; ++ $_622 = FALSE; break; + } + while(0); +- if( $_603 === TRUE ) { $_605 = TRUE; break; } +- $result = $res_578; +- $this->pos = $pos_578; +- $_605 = FALSE; break; ++ if( $_622 === TRUE ) { $_624 = TRUE; break; } ++ $result = $res_597; ++ $this->pos = $pos_597; ++ $_624 = FALSE; break; + } + while(0); +- if( $_605 === FALSE) { $_607 = FALSE; break; } +- $_607 = TRUE; break; ++ if( $_624 === FALSE) { $_626 = FALSE; break; } ++ $_626 = TRUE; break; + } + while(0); +- if( $_607 === FALSE) { $_610 = FALSE; break; } ++ if( $_626 === FALSE) { $_629 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_610 = FALSE; break; } +- $_610 = TRUE; break; ++ else { $_629 = FALSE; break; } ++ $_629 = TRUE; break; + } + while(0); +- if( $_610 === TRUE ) { $_612 = TRUE; break; } +- $result = $res_576; +- $this->pos = $pos_576; +- $_612 = FALSE; break; ++ if( $_629 === TRUE ) { $_631 = TRUE; break; } ++ $result = $res_595; ++ $this->pos = $pos_595; ++ $_631 = FALSE; break; + } + while(0); +- if( $_612 === TRUE ) { return $this->finalise($result); } +- if( $_612 === FALSE) { return FALSE; } ++ if( $_631 === TRUE ) { return $this->finalise($result); } ++ if( $_631 === FALSE) { return FALSE; } + } + + +@@ -3719,53 +3825,53 @@ function match_NotBlockTag ($stack = array()) { + protected $match_ClosedBlock_typestack = array('ClosedBlock'); + function match_ClosedBlock ($stack = array()) { + $matchrule = ""ClosedBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_632 = NULL; ++ $_651 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_632 = FALSE; break; } ++ else { $_651 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_616 = $result; +- $pos_616 = $this->pos; ++ $res_635 = $result; ++ $pos_635 = $this->pos; + $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $result = $res_616; +- $this->pos = $pos_616; +- $_632 = FALSE; break; ++ $result = $res_635; ++ $this->pos = $pos_635; ++ $_651 = FALSE; break; + } + else { +- $result = $res_616; +- $this->pos = $pos_616; ++ $result = $res_635; ++ $this->pos = $pos_635; + } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BlockName"" ); + } +- else { $_632 = FALSE; break; } +- $res_622 = $result; +- $pos_622 = $this->pos; +- $_621 = NULL; ++ else { $_651 = FALSE; break; } ++ $res_641 = $result; ++ $pos_641 = $this->pos; ++ $_640 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_621 = FALSE; break; } ++ else { $_640 = FALSE; break; } + $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BlockArguments"" ); + } +- else { $_621 = FALSE; break; } ++ else { $_640 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_621 = FALSE; break; } +- $_621 = TRUE; break; ++ else { $_640 = FALSE; break; } ++ $_640 = TRUE; break; + } + while(0); +- if( $_621 === FALSE) { +- $result = $res_622; +- $this->pos = $pos_622; +- unset( $res_622 ); +- unset( $pos_622 ); ++ if( $_640 === FALSE) { ++ $result = $res_641; ++ $this->pos = $pos_641; ++ unset( $res_641 ); ++ unset( $pos_641 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $stack[] = $result; $result = $this->construct( $matchrule, ""Zap"" ); +@@ -3776,36 +3882,36 @@ function match_ClosedBlock ($stack = array()) { + } + else { + $result = array_pop($stack); +- $_632 = FALSE; break; ++ $_651 = FALSE; break; + } +- $res_625 = $result; +- $pos_625 = $this->pos; ++ $res_644 = $result; ++ $pos_644 = $this->pos; + $matcher = 'match_'.$this->expression($result, $stack, 'TemplateMatcher'); $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Template"" ); + } + else { +- $result = $res_625; +- $this->pos = $pos_625; +- unset( $res_625 ); +- unset( $pos_625 ); ++ $result = $res_644; ++ $this->pos = $pos_644; ++ unset( $res_644 ); ++ unset( $pos_644 ); + } + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_632 = FALSE; break; } ++ else { $_651 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_632 = FALSE; break; } ++ else { $_651 = FALSE; break; } + if (( $subres = $this->literal( ''.$this->expression($result, $stack, 'BlockName').'' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_632 = FALSE; break; } ++ else { $_651 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_632 = FALSE; break; } +- $_632 = TRUE; break; ++ else { $_651 = FALSE; break; } ++ $_651 = TRUE; break; + } + while(0); +- if( $_632 === TRUE ) { return $this->finalise($result); } +- if( $_632 === FALSE) { return FALSE; } ++ if( $_651 === TRUE ) { return $this->finalise($result); } ++ if( $_651 === FALSE) { return FALSE; } + } + + +@@ -3913,62 +4019,62 @@ function ClosedBlock_Handle_With(&$res) + protected $match_OpenBlock_typestack = array('OpenBlock'); + function match_OpenBlock ($stack = array()) { + $matchrule = ""OpenBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_645 = NULL; ++ $_664 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_645 = FALSE; break; } ++ else { $_664 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_636 = $result; +- $pos_636 = $this->pos; ++ $res_655 = $result; ++ $pos_655 = $this->pos; + $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $result = $res_636; +- $this->pos = $pos_636; +- $_645 = FALSE; break; ++ $result = $res_655; ++ $this->pos = $pos_655; ++ $_664 = FALSE; break; + } + else { +- $result = $res_636; +- $this->pos = $pos_636; ++ $result = $res_655; ++ $this->pos = $pos_655; + } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BlockName"" ); + } +- else { $_645 = FALSE; break; } +- $res_642 = $result; +- $pos_642 = $this->pos; +- $_641 = NULL; ++ else { $_664 = FALSE; break; } ++ $res_661 = $result; ++ $pos_661 = $this->pos; ++ $_660 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_641 = FALSE; break; } ++ else { $_660 = FALSE; break; } + $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BlockArguments"" ); + } +- else { $_641 = FALSE; break; } ++ else { $_660 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_641 = FALSE; break; } +- $_641 = TRUE; break; ++ else { $_660 = FALSE; break; } ++ $_660 = TRUE; break; + } + while(0); +- if( $_641 === FALSE) { +- $result = $res_642; +- $this->pos = $pos_642; +- unset( $res_642 ); +- unset( $pos_642 ); ++ if( $_660 === FALSE) { ++ $result = $res_661; ++ $this->pos = $pos_661; ++ unset( $res_661 ); ++ unset( $pos_661 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_645 = FALSE; break; } +- $_645 = TRUE; break; ++ else { $_664 = FALSE; break; } ++ $_664 = TRUE; break; + } + while(0); +- if( $_645 === TRUE ) { return $this->finalise($result); } +- if( $_645 === FALSE) { return FALSE; } ++ if( $_664 === TRUE ) { return $this->finalise($result); } ++ if( $_664 === FALSE) { return FALSE; } + } + + +@@ -4051,27 +4157,27 @@ function OpenBlock_Handle_Current_page(&$res) + protected $match_MismatchedEndBlock_typestack = array('MismatchedEndBlock'); + function match_MismatchedEndBlock ($stack = array()) { + $matchrule = ""MismatchedEndBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_653 = NULL; ++ $_672 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_653 = FALSE; break; } ++ else { $_672 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_653 = FALSE; break; } ++ else { $_672 = FALSE; break; } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Word"" ); + } +- else { $_653 = FALSE; break; } ++ else { $_672 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_653 = FALSE; break; } +- $_653 = TRUE; break; ++ else { $_672 = FALSE; break; } ++ $_672 = TRUE; break; + } + while(0); +- if( $_653 === TRUE ) { return $this->finalise($result); } +- if( $_653 === FALSE) { return FALSE; } ++ if( $_672 === TRUE ) { return $this->finalise($result); } ++ if( $_672 === FALSE) { return FALSE; } + } + + +@@ -4087,78 +4193,78 @@ function MismatchedEndBlock__finalise(&$res) + protected $match_MalformedOpenTag_typestack = array('MalformedOpenTag'); + function match_MalformedOpenTag ($stack = array()) { + $matchrule = ""MalformedOpenTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_668 = NULL; ++ $_687 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_668 = FALSE; break; } ++ else { $_687 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- $res_657 = $result; +- $pos_657 = $this->pos; ++ $res_676 = $result; ++ $pos_676 = $this->pos; + $matcher = 'match_'.'NotBlockTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $result = $res_657; +- $this->pos = $pos_657; +- $_668 = FALSE; break; ++ $result = $res_676; ++ $this->pos = $pos_676; ++ $_687 = FALSE; break; + } + else { +- $result = $res_657; +- $this->pos = $pos_657; ++ $result = $res_676; ++ $this->pos = $pos_676; + } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Tag"" ); + } +- else { $_668 = FALSE; break; } +- $res_667 = $result; +- $pos_667 = $this->pos; +- $_666 = NULL; ++ else { $_687 = FALSE; break; } ++ $res_686 = $result; ++ $pos_686 = $this->pos; ++ $_685 = NULL; + do { +- $res_663 = $result; +- $pos_663 = $this->pos; +- $_662 = NULL; ++ $res_682 = $result; ++ $pos_682 = $this->pos; ++ $_681 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_662 = FALSE; break; } ++ else { $_681 = FALSE; break; } + $matcher = 'match_'.'BlockArguments'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""BlockArguments"" ); + } +- else { $_662 = FALSE; break; } ++ else { $_681 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_662 = FALSE; break; } +- $_662 = TRUE; break; ++ else { $_681 = FALSE; break; } ++ $_681 = TRUE; break; + } + while(0); +- if( $_662 === FALSE) { +- $result = $res_663; +- $this->pos = $pos_663; +- unset( $res_663 ); +- unset( $pos_663 ); ++ if( $_681 === FALSE) { ++ $result = $res_682; ++ $this->pos = $pos_682; ++ unset( $res_682 ); ++ unset( $pos_682 ); + } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_666 = FALSE; break; } +- $_666 = TRUE; break; ++ else { $_685 = FALSE; break; } ++ $_685 = TRUE; break; + } + while(0); +- if( $_666 === TRUE ) { +- $result = $res_667; +- $this->pos = $pos_667; +- $_668 = FALSE; break; ++ if( $_685 === TRUE ) { ++ $result = $res_686; ++ $this->pos = $pos_686; ++ $_687 = FALSE; break; + } +- if( $_666 === FALSE) { +- $result = $res_667; +- $this->pos = $pos_667; ++ if( $_685 === FALSE) { ++ $result = $res_686; ++ $this->pos = $pos_686; + } +- $_668 = TRUE; break; ++ $_687 = TRUE; break; + } + while(0); +- if( $_668 === TRUE ) { return $this->finalise($result); } +- if( $_668 === FALSE) { return FALSE; } ++ if( $_687 === TRUE ) { return $this->finalise($result); } ++ if( $_687 === FALSE) { return FALSE; } + } + + +@@ -4173,57 +4279,57 @@ function MalformedOpenTag__finalise(&$res) + protected $match_MalformedCloseTag_typestack = array('MalformedCloseTag'); + function match_MalformedCloseTag ($stack = array()) { + $matchrule = ""MalformedCloseTag""; $result = $this->construct($matchrule, $matchrule, null); +- $_680 = NULL; ++ $_699 = NULL; + do { + if (( $subres = $this->literal( '<%' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_680 = FALSE; break; } ++ else { $_699 = FALSE; break; } + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + $stack[] = $result; $result = $this->construct( $matchrule, ""Tag"" ); +- $_674 = NULL; ++ $_693 = NULL; + do { + if (( $subres = $this->literal( 'end_' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_674 = FALSE; break; } ++ else { $_693 = FALSE; break; } + $matcher = 'match_'.'Word'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""Word"" ); + } +- else { $_674 = FALSE; break; } +- $_674 = TRUE; break; ++ else { $_693 = FALSE; break; } ++ $_693 = TRUE; break; + } + while(0); +- if( $_674 === TRUE ) { ++ if( $_693 === TRUE ) { + $subres = $result; $result = array_pop($stack); + $this->store( $result, $subres, 'Tag' ); + } +- if( $_674 === FALSE) { ++ if( $_693 === FALSE) { + $result = array_pop($stack); +- $_680 = FALSE; break; ++ $_699 = FALSE; break; + } +- $res_679 = $result; +- $pos_679 = $this->pos; +- $_678 = NULL; ++ $res_698 = $result; ++ $pos_698 = $this->pos; ++ $_697 = NULL; + do { + if (( $subres = $this->whitespace( ) ) !== FALSE) { $result[""text""] .= $subres; } + if (( $subres = $this->literal( '%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_678 = FALSE; break; } +- $_678 = TRUE; break; ++ else { $_697 = FALSE; break; } ++ $_697 = TRUE; break; + } + while(0); +- if( $_678 === TRUE ) { +- $result = $res_679; +- $this->pos = $pos_679; +- $_680 = FALSE; break; ++ if( $_697 === TRUE ) { ++ $result = $res_698; ++ $this->pos = $pos_698; ++ $_699 = FALSE; break; + } +- if( $_678 === FALSE) { +- $result = $res_679; +- $this->pos = $pos_679; ++ if( $_697 === FALSE) { ++ $result = $res_698; ++ $this->pos = $pos_698; + } +- $_680 = TRUE; break; ++ $_699 = TRUE; break; + } + while(0); +- if( $_680 === TRUE ) { return $this->finalise($result); } +- if( $_680 === FALSE) { return FALSE; } ++ if( $_699 === TRUE ) { return $this->finalise($result); } ++ if( $_699 === FALSE) { return FALSE; } + } + + +@@ -4239,31 +4345,31 @@ function MalformedCloseTag__finalise(&$res) + protected $match_MalformedBlock_typestack = array('MalformedBlock'); + function match_MalformedBlock ($stack = array()) { + $matchrule = ""MalformedBlock""; $result = $this->construct($matchrule, $matchrule, null); +- $_685 = NULL; ++ $_704 = NULL; + do { +- $res_682 = $result; +- $pos_682 = $this->pos; ++ $res_701 = $result; ++ $pos_701 = $this->pos; + $matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_685 = TRUE; break; ++ $_704 = TRUE; break; + } +- $result = $res_682; +- $this->pos = $pos_682; ++ $result = $res_701; ++ $this->pos = $pos_701; + $matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_685 = TRUE; break; ++ $_704 = TRUE; break; + } +- $result = $res_682; +- $this->pos = $pos_682; +- $_685 = FALSE; break; ++ $result = $res_701; ++ $this->pos = $pos_701; ++ $_704 = FALSE; break; + } + while(0); +- if( $_685 === TRUE ) { return $this->finalise($result); } +- if( $_685 === FALSE) { return FALSE; } ++ if( $_704 === TRUE ) { return $this->finalise($result); } ++ if( $_704 === FALSE) { return FALSE; } + } + + +@@ -4273,51 +4379,51 @@ function match_MalformedBlock ($stack = array()) { + protected $match_CommentWithContent_typestack = array('CommentWithContent'); + function match_CommentWithContent ($stack = array()) { + $matchrule = ""CommentWithContent""; $result = $this->construct($matchrule, $matchrule, null); +- $_693 = NULL; ++ $_712 = NULL; + do { + if (( $subres = $this->literal( '<%--' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_693 = FALSE; break; } ++ else { $_712 = FALSE; break; } + $count = 0; + while (true) { +- $res_691 = $result; +- $pos_691 = $this->pos; +- $_690 = NULL; ++ $res_710 = $result; ++ $pos_710 = $this->pos; ++ $_709 = NULL; + do { +- $res_688 = $result; +- $pos_688 = $this->pos; ++ $res_707 = $result; ++ $pos_707 = $this->pos; + if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $result = $res_688; +- $this->pos = $pos_688; +- $_690 = FALSE; break; ++ $result = $res_707; ++ $this->pos = $pos_707; ++ $_709 = FALSE; break; + } + else { +- $result = $res_688; +- $this->pos = $pos_688; ++ $result = $res_707; ++ $this->pos = $pos_707; + } + if (( $subres = $this->rx( '/(?s)./' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_690 = FALSE; break; } +- $_690 = TRUE; break; ++ else { $_709 = FALSE; break; } ++ $_709 = TRUE; break; + } + while(0); +- if( $_690 === FALSE) { +- $result = $res_691; +- $this->pos = $pos_691; +- unset( $res_691 ); +- unset( $pos_691 ); ++ if( $_709 === FALSE) { ++ $result = $res_710; ++ $this->pos = $pos_710; ++ unset( $res_710 ); ++ unset( $pos_710 ); + break; + } + $count += 1; + } + if ($count > 0) { } +- else { $_693 = FALSE; break; } ++ else { $_712 = FALSE; break; } + if (( $subres = $this->literal( '--%>' ) ) !== FALSE) { $result[""text""] .= $subres; } +- else { $_693 = FALSE; break; } +- $_693 = TRUE; break; ++ else { $_712 = FALSE; break; } ++ $_712 = TRUE; break; + } + while(0); +- if( $_693 === TRUE ) { return $this->finalise($result); } +- if( $_693 === FALSE) { return FALSE; } ++ if( $_712 === TRUE ) { return $this->finalise($result); } ++ if( $_712 === FALSE) { return FALSE; } + } + + +@@ -4337,31 +4443,31 @@ function match_EmptyComment ($stack = array()) { + protected $match_Comment_typestack = array('Comment'); + function match_Comment ($stack = array()) { + $matchrule = ""Comment""; $result = $this->construct($matchrule, $matchrule, null); +- $_699 = NULL; ++ $_718 = NULL; + do { +- $res_696 = $result; +- $pos_696 = $this->pos; ++ $res_715 = $result; ++ $pos_715 = $this->pos; + $matcher = 'match_'.'EmptyComment'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""EmptyComment"" ); +- $_699 = TRUE; break; ++ $_718 = TRUE; break; + } +- $result = $res_696; +- $this->pos = $pos_696; ++ $result = $res_715; ++ $this->pos = $pos_715; + $matcher = 'match_'.'CommentWithContent'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres, ""CommentWithContent"" ); +- $_699 = TRUE; break; ++ $_718 = TRUE; break; + } +- $result = $res_696; +- $this->pos = $pos_696; +- $_699 = FALSE; break; ++ $result = $res_715; ++ $this->pos = $pos_715; ++ $_718 = FALSE; break; + } + while(0); +- if( $_699 === TRUE ) { return $this->finalise($result); } +- if( $_699 === FALSE) { return FALSE; } ++ if( $_718 === TRUE ) { return $this->finalise($result); } ++ if( $_718 === FALSE) { return FALSE; } + } + + +@@ -4372,266 +4478,286 @@ function Comment__construct(&$res) + } + + /* TopTemplate: (Comment | Translate | If | Require | CacheBlock | UncachedBlock | OldI18NTag | Include | ClosedBlock | +- OpenBlock | MalformedBlock | MismatchedEndBlock | Injection | Text)+ */ ++ OpenBlock | MalformedBlock | MismatchedEndBlock | MalformedBracketInjection | Injection | Text)+ */ + protected $match_TopTemplate_typestack = array('TopTemplate','Template'); + function match_TopTemplate ($stack = array()) { + $matchrule = ""TopTemplate""; $result = $this->construct($matchrule, $matchrule, array('TemplateMatcher' => 'Template')); + $count = 0; + while (true) { +- $res_755 = $result; +- $pos_755 = $this->pos; +- $_754 = NULL; ++ $res_778 = $result; ++ $pos_778 = $this->pos; ++ $_777 = NULL; + do { +- $_752 = NULL; ++ $_775 = NULL; + do { +- $res_701 = $result; +- $pos_701 = $this->pos; ++ $res_720 = $result; ++ $pos_720 = $this->pos; + $matcher = 'match_'.'Comment'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_752 = TRUE; break; ++ $_775 = TRUE; break; + } +- $result = $res_701; +- $this->pos = $pos_701; +- $_750 = NULL; ++ $result = $res_720; ++ $this->pos = $pos_720; ++ $_773 = NULL; + do { +- $res_703 = $result; +- $pos_703 = $this->pos; ++ $res_722 = $result; ++ $pos_722 = $this->pos; + $matcher = 'match_'.'Translate'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_750 = TRUE; break; ++ $_773 = TRUE; break; + } +- $result = $res_703; +- $this->pos = $pos_703; +- $_748 = NULL; ++ $result = $res_722; ++ $this->pos = $pos_722; ++ $_771 = NULL; + do { +- $res_705 = $result; +- $pos_705 = $this->pos; ++ $res_724 = $result; ++ $pos_724 = $this->pos; + $matcher = 'match_'.'If'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_748 = TRUE; break; ++ $_771 = TRUE; break; + } +- $result = $res_705; +- $this->pos = $pos_705; +- $_746 = NULL; ++ $result = $res_724; ++ $this->pos = $pos_724; ++ $_769 = NULL; + do { +- $res_707 = $result; +- $pos_707 = $this->pos; ++ $res_726 = $result; ++ $pos_726 = $this->pos; + $matcher = 'match_'.'Require'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_746 = TRUE; break; ++ $_769 = TRUE; break; + } +- $result = $res_707; +- $this->pos = $pos_707; +- $_744 = NULL; ++ $result = $res_726; ++ $this->pos = $pos_726; ++ $_767 = NULL; + do { +- $res_709 = $result; +- $pos_709 = $this->pos; ++ $res_728 = $result; ++ $pos_728 = $this->pos; + $matcher = 'match_'.'CacheBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_744 = TRUE; break; ++ $_767 = TRUE; break; + } +- $result = $res_709; +- $this->pos = $pos_709; +- $_742 = NULL; ++ $result = $res_728; ++ $this->pos = $pos_728; ++ $_765 = NULL; + do { +- $res_711 = $result; +- $pos_711 = $this->pos; ++ $res_730 = $result; ++ $pos_730 = $this->pos; + $matcher = 'match_'.'UncachedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_742 = TRUE; break; ++ $_765 = TRUE; break; + } +- $result = $res_711; +- $this->pos = $pos_711; +- $_740 = NULL; ++ $result = $res_730; ++ $this->pos = $pos_730; ++ $_763 = NULL; + do { +- $res_713 = $result; +- $pos_713 = $this->pos; ++ $res_732 = $result; ++ $pos_732 = $this->pos; + $matcher = 'match_'.'OldI18NTag'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_740 = TRUE; break; ++ $_763 = TRUE; break; + } +- $result = $res_713; +- $this->pos = $pos_713; +- $_738 = NULL; ++ $result = $res_732; ++ $this->pos = $pos_732; ++ $_761 = NULL; + do { +- $res_715 = $result; +- $pos_715 = $this->pos; ++ $res_734 = $result; ++ $pos_734 = $this->pos; + $matcher = 'match_'.'Include'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_738 = TRUE; break; ++ $_761 = TRUE; break; + } +- $result = $res_715; +- $this->pos = $pos_715; +- $_736 = NULL; ++ $result = $res_734; ++ $this->pos = $pos_734; ++ $_759 = NULL; + do { +- $res_717 = $result; +- $pos_717 = $this->pos; ++ $res_736 = $result; ++ $pos_736 = $this->pos; + $matcher = 'match_'.'ClosedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_736 = TRUE; break; ++ $_759 = TRUE; break; + } +- $result = $res_717; +- $this->pos = $pos_717; +- $_734 = NULL; ++ $result = $res_736; ++ $this->pos = $pos_736; ++ $_757 = NULL; + do { +- $res_719 = $result; +- $pos_719 = $this->pos; ++ $res_738 = $result; ++ $pos_738 = $this->pos; + $matcher = 'match_'.'OpenBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_734 = TRUE; break; ++ $_757 = TRUE; break; + } +- $result = $res_719; +- $this->pos = $pos_719; +- $_732 = NULL; ++ $result = $res_738; ++ $this->pos = $pos_738; ++ $_755 = NULL; + do { +- $res_721 = $result; +- $pos_721 = $this->pos; ++ $res_740 = $result; ++ $pos_740 = $this->pos; + $matcher = 'match_'.'MalformedBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_732 = TRUE; break; ++ $_755 = TRUE; break; + } +- $result = $res_721; +- $this->pos = $pos_721; +- $_730 = NULL; ++ $result = $res_740; ++ $this->pos = $pos_740; ++ $_753 = NULL; + do { +- $res_723 = $result; +- $pos_723 = $this->pos; ++ $res_742 = $result; ++ $pos_742 = $this->pos; + $matcher = 'match_'.'MismatchedEndBlock'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_730 = TRUE; break; ++ $_753 = TRUE; break; + } +- $result = $res_723; +- $this->pos = $pos_723; +- $_728 = NULL; ++ $result = $res_742; ++ $this->pos = $pos_742; ++ $_751 = NULL; + do { +- $res_725 = $result; +- $pos_725 = $this->pos; +- $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $res_744 = $result; ++ $pos_744 = $this->pos; ++ $matcher = 'match_'.'MalformedBracketInjection'; $key = $matcher; $pos = $this->pos; + $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); + if ($subres !== FALSE) { + $this->store( $result, $subres ); +- $_728 = TRUE; break; ++ $_751 = TRUE; break; + } +- $result = $res_725; +- $this->pos = $pos_725; +- $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; +- $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); +- if ($subres !== FALSE) { +- $this->store( $result, $subres ); +- $_728 = TRUE; break; ++ $result = $res_744; ++ $this->pos = $pos_744; ++ $_749 = NULL; ++ do { ++ $res_746 = $result; ++ $pos_746 = $this->pos; ++ $matcher = 'match_'.'Injection'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_749 = TRUE; break; ++ } ++ $result = $res_746; ++ $this->pos = $pos_746; ++ $matcher = 'match_'.'Text'; $key = $matcher; $pos = $this->pos; ++ $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) ); ++ if ($subres !== FALSE) { ++ $this->store( $result, $subres ); ++ $_749 = TRUE; break; ++ } ++ $result = $res_746; ++ $this->pos = $pos_746; ++ $_749 = FALSE; break; ++ } ++ while(0); ++ if( $_749 === TRUE ) { ++ $_751 = TRUE; break; + } +- $result = $res_725; +- $this->pos = $pos_725; +- $_728 = FALSE; break; ++ $result = $res_744; ++ $this->pos = $pos_744; ++ $_751 = FALSE; break; + } + while(0); +- if( $_728 === TRUE ) { +- $_730 = TRUE; break; ++ if( $_751 === TRUE ) { ++ $_753 = TRUE; break; + } +- $result = $res_723; +- $this->pos = $pos_723; +- $_730 = FALSE; break; ++ $result = $res_742; ++ $this->pos = $pos_742; ++ $_753 = FALSE; break; + } + while(0); +- if( $_730 === TRUE ) { $_732 = TRUE; break; } +- $result = $res_721; +- $this->pos = $pos_721; +- $_732 = FALSE; break; ++ if( $_753 === TRUE ) { $_755 = TRUE; break; } ++ $result = $res_740; ++ $this->pos = $pos_740; ++ $_755 = FALSE; break; + } + while(0); +- if( $_732 === TRUE ) { $_734 = TRUE; break; } +- $result = $res_719; +- $this->pos = $pos_719; +- $_734 = FALSE; break; ++ if( $_755 === TRUE ) { $_757 = TRUE; break; } ++ $result = $res_738; ++ $this->pos = $pos_738; ++ $_757 = FALSE; break; + } + while(0); +- if( $_734 === TRUE ) { $_736 = TRUE; break; } +- $result = $res_717; +- $this->pos = $pos_717; +- $_736 = FALSE; break; ++ if( $_757 === TRUE ) { $_759 = TRUE; break; } ++ $result = $res_736; ++ $this->pos = $pos_736; ++ $_759 = FALSE; break; + } + while(0); +- if( $_736 === TRUE ) { $_738 = TRUE; break; } +- $result = $res_715; +- $this->pos = $pos_715; +- $_738 = FALSE; break; ++ if( $_759 === TRUE ) { $_761 = TRUE; break; } ++ $result = $res_734; ++ $this->pos = $pos_734; ++ $_761 = FALSE; break; + } + while(0); +- if( $_738 === TRUE ) { $_740 = TRUE; break; } +- $result = $res_713; +- $this->pos = $pos_713; +- $_740 = FALSE; break; ++ if( $_761 === TRUE ) { $_763 = TRUE; break; } ++ $result = $res_732; ++ $this->pos = $pos_732; ++ $_763 = FALSE; break; + } + while(0); +- if( $_740 === TRUE ) { $_742 = TRUE; break; } +- $result = $res_711; +- $this->pos = $pos_711; +- $_742 = FALSE; break; ++ if( $_763 === TRUE ) { $_765 = TRUE; break; } ++ $result = $res_730; ++ $this->pos = $pos_730; ++ $_765 = FALSE; break; + } + while(0); +- if( $_742 === TRUE ) { $_744 = TRUE; break; } +- $result = $res_709; +- $this->pos = $pos_709; +- $_744 = FALSE; break; ++ if( $_765 === TRUE ) { $_767 = TRUE; break; } ++ $result = $res_728; ++ $this->pos = $pos_728; ++ $_767 = FALSE; break; + } + while(0); +- if( $_744 === TRUE ) { $_746 = TRUE; break; } +- $result = $res_707; +- $this->pos = $pos_707; +- $_746 = FALSE; break; ++ if( $_767 === TRUE ) { $_769 = TRUE; break; } ++ $result = $res_726; ++ $this->pos = $pos_726; ++ $_769 = FALSE; break; + } + while(0); +- if( $_746 === TRUE ) { $_748 = TRUE; break; } +- $result = $res_705; +- $this->pos = $pos_705; +- $_748 = FALSE; break; ++ if( $_769 === TRUE ) { $_771 = TRUE; break; } ++ $result = $res_724; ++ $this->pos = $pos_724; ++ $_771 = FALSE; break; + } + while(0); +- if( $_748 === TRUE ) { $_750 = TRUE; break; } +- $result = $res_703; +- $this->pos = $pos_703; +- $_750 = FALSE; break; ++ if( $_771 === TRUE ) { $_773 = TRUE; break; } ++ $result = $res_722; ++ $this->pos = $pos_722; ++ $_773 = FALSE; break; + } + while(0); +- if( $_750 === TRUE ) { $_752 = TRUE; break; } +- $result = $res_701; +- $this->pos = $pos_701; +- $_752 = FALSE; break; ++ if( $_773 === TRUE ) { $_775 = TRUE; break; } ++ $result = $res_720; ++ $this->pos = $pos_720; ++ $_775 = FALSE; break; + } + while(0); +- if( $_752 === FALSE) { $_754 = FALSE; break; } +- $_754 = TRUE; break; ++ if( $_775 === FALSE) { $_777 = FALSE; break; } ++ $_777 = TRUE; break; + } + while(0); +- if( $_754 === FALSE) { +- $result = $res_755; +- $this->pos = $pos_755; +- unset( $res_755 ); +- unset( $pos_755 ); ++ if( $_777 === FALSE) { ++ $result = $res_778; ++ $this->pos = $pos_778; ++ unset( $res_778 ); ++ unset( $pos_778 ); + break; + } + $count += 1; +@@ -4664,195 +4790,195 @@ function match_Text ($stack = array()) { + $matchrule = ""Text""; $result = $this->construct($matchrule, $matchrule, null); + $count = 0; + while (true) { +- $res_794 = $result; +- $pos_794 = $this->pos; +- $_793 = NULL; ++ $res_817 = $result; ++ $pos_817 = $this->pos; ++ $_816 = NULL; + do { +- $_791 = NULL; ++ $_814 = NULL; + do { +- $res_756 = $result; +- $pos_756 = $this->pos; ++ $res_779 = $result; ++ $pos_779 = $this->pos; + if (( $subres = $this->rx( '/ [^<${\\\\]+ /' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_791 = TRUE; break; ++ $_814 = TRUE; break; + } +- $result = $res_756; +- $this->pos = $pos_756; +- $_789 = NULL; ++ $result = $res_779; ++ $this->pos = $pos_779; ++ $_812 = NULL; + do { +- $res_758 = $result; +- $pos_758 = $this->pos; ++ $res_781 = $result; ++ $pos_781 = $this->pos; + if (( $subres = $this->rx( '/ (\\\\.) /' ) ) !== FALSE) { + $result[""text""] .= $subres; +- $_789 = TRUE; break; ++ $_812 = TRUE; break; + } +- $result = $res_758; +- $this->pos = $pos_758; +- $_787 = NULL; ++ $result = $res_781; ++ $this->pos = $pos_781; ++ $_810 = NULL; + do { +- $res_760 = $result; +- $pos_760 = $this->pos; +- $_763 = NULL; ++ $res_783 = $result; ++ $pos_783 = $this->pos; ++ $_786 = NULL; + do { + if (substr($this->string,$this->pos,1) == '<') { + $this->pos += 1; + $result[""text""] .= '<'; + } +- else { $_763 = FALSE; break; } +- $res_762 = $result; +- $pos_762 = $this->pos; ++ else { $_786 = FALSE; break; } ++ $res_785 = $result; ++ $pos_785 = $this->pos; + if (substr($this->string,$this->pos,1) == '%') { + $this->pos += 1; + $result[""text""] .= '%'; +- $result = $res_762; +- $this->pos = $pos_762; +- $_763 = FALSE; break; ++ $result = $res_785; ++ $this->pos = $pos_785; ++ $_786 = FALSE; break; + } + else { +- $result = $res_762; +- $this->pos = $pos_762; ++ $result = $res_785; ++ $this->pos = $pos_785; + } +- $_763 = TRUE; break; ++ $_786 = TRUE; break; + } + while(0); +- if( $_763 === TRUE ) { $_787 = TRUE; break; } +- $result = $res_760; +- $this->pos = $pos_760; +- $_785 = NULL; ++ if( $_786 === TRUE ) { $_810 = TRUE; break; } ++ $result = $res_783; ++ $this->pos = $pos_783; ++ $_808 = NULL; + do { +- $res_765 = $result; +- $pos_765 = $this->pos; +- $_770 = NULL; ++ $res_788 = $result; ++ $pos_788 = $this->pos; ++ $_793 = NULL; + do { + if (substr($this->string,$this->pos,1) == '$') { + $this->pos += 1; + $result[""text""] .= '$'; + } +- else { $_770 = FALSE; break; } +- $res_769 = $result; +- $pos_769 = $this->pos; +- $_768 = NULL; ++ else { $_793 = FALSE; break; } ++ $res_792 = $result; ++ $pos_792 = $this->pos; ++ $_791 = NULL; + do { + if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { + $result[""text""] .= $subres; + } +- else { $_768 = FALSE; break; } +- $_768 = TRUE; break; ++ else { $_791 = FALSE; break; } ++ $_791 = TRUE; break; + } + while(0); +- if( $_768 === TRUE ) { +- $result = $res_769; +- $this->pos = $pos_769; +- $_770 = FALSE; break; ++ if( $_791 === TRUE ) { ++ $result = $res_792; ++ $this->pos = $pos_792; ++ $_793 = FALSE; break; + } +- if( $_768 === FALSE) { +- $result = $res_769; +- $this->pos = $pos_769; ++ if( $_791 === FALSE) { ++ $result = $res_792; ++ $this->pos = $pos_792; + } +- $_770 = TRUE; break; ++ $_793 = TRUE; break; + } + while(0); +- if( $_770 === TRUE ) { $_785 = TRUE; break; } +- $result = $res_765; +- $this->pos = $pos_765; +- $_783 = NULL; ++ if( $_793 === TRUE ) { $_808 = TRUE; break; } ++ $result = $res_788; ++ $this->pos = $pos_788; ++ $_806 = NULL; + do { +- $res_772 = $result; +- $pos_772 = $this->pos; +- $_775 = NULL; ++ $res_795 = $result; ++ $pos_795 = $this->pos; ++ $_798 = NULL; + do { + if (substr($this->string,$this->pos,1) == '{') { + $this->pos += 1; + $result[""text""] .= '{'; + } +- else { $_775 = FALSE; break; } +- $res_774 = $result; +- $pos_774 = $this->pos; ++ else { $_798 = FALSE; break; } ++ $res_797 = $result; ++ $pos_797 = $this->pos; + if (substr($this->string,$this->pos,1) == '$') { + $this->pos += 1; + $result[""text""] .= '$'; +- $result = $res_774; +- $this->pos = $pos_774; +- $_775 = FALSE; break; ++ $result = $res_797; ++ $this->pos = $pos_797; ++ $_798 = FALSE; break; + } + else { +- $result = $res_774; +- $this->pos = $pos_774; ++ $result = $res_797; ++ $this->pos = $pos_797; + } +- $_775 = TRUE; break; ++ $_798 = TRUE; break; + } + while(0); +- if( $_775 === TRUE ) { $_783 = TRUE; break; } +- $result = $res_772; +- $this->pos = $pos_772; +- $_781 = NULL; ++ if( $_798 === TRUE ) { $_806 = TRUE; break; } ++ $result = $res_795; ++ $this->pos = $pos_795; ++ $_804 = NULL; + do { + if (( $subres = $this->literal( '{$' ) ) !== FALSE) { + $result[""text""] .= $subres; + } +- else { $_781 = FALSE; break; } +- $res_780 = $result; +- $pos_780 = $this->pos; +- $_779 = NULL; ++ else { $_804 = FALSE; break; } ++ $res_803 = $result; ++ $pos_803 = $this->pos; ++ $_802 = NULL; + do { + if (( $subres = $this->rx( '/[A-Za-z_]/' ) ) !== FALSE) { + $result[""text""] .= $subres; + } +- else { $_779 = FALSE; break; } +- $_779 = TRUE; break; ++ else { $_802 = FALSE; break; } ++ $_802 = TRUE; break; + } + while(0); +- if( $_779 === TRUE ) { +- $result = $res_780; +- $this->pos = $pos_780; +- $_781 = FALSE; break; ++ if( $_802 === TRUE ) { ++ $result = $res_803; ++ $this->pos = $pos_803; ++ $_804 = FALSE; break; + } +- if( $_779 === FALSE) { +- $result = $res_780; +- $this->pos = $pos_780; ++ if( $_802 === FALSE) { ++ $result = $res_803; ++ $this->pos = $pos_803; + } +- $_781 = TRUE; break; ++ $_804 = TRUE; break; + } + while(0); +- if( $_781 === TRUE ) { $_783 = TRUE; break; } +- $result = $res_772; +- $this->pos = $pos_772; +- $_783 = FALSE; break; ++ if( $_804 === TRUE ) { $_806 = TRUE; break; } ++ $result = $res_795; ++ $this->pos = $pos_795; ++ $_806 = FALSE; break; + } + while(0); +- if( $_783 === TRUE ) { $_785 = TRUE; break; } +- $result = $res_765; +- $this->pos = $pos_765; +- $_785 = FALSE; break; ++ if( $_806 === TRUE ) { $_808 = TRUE; break; } ++ $result = $res_788; ++ $this->pos = $pos_788; ++ $_808 = FALSE; break; + } + while(0); +- if( $_785 === TRUE ) { $_787 = TRUE; break; } +- $result = $res_760; +- $this->pos = $pos_760; +- $_787 = FALSE; break; ++ if( $_808 === TRUE ) { $_810 = TRUE; break; } ++ $result = $res_783; ++ $this->pos = $pos_783; ++ $_810 = FALSE; break; + } + while(0); +- if( $_787 === TRUE ) { $_789 = TRUE; break; } +- $result = $res_758; +- $this->pos = $pos_758; +- $_789 = FALSE; break; ++ if( $_810 === TRUE ) { $_812 = TRUE; break; } ++ $result = $res_781; ++ $this->pos = $pos_781; ++ $_812 = FALSE; break; + } + while(0); +- if( $_789 === TRUE ) { $_791 = TRUE; break; } +- $result = $res_756; +- $this->pos = $pos_756; +- $_791 = FALSE; break; ++ if( $_812 === TRUE ) { $_814 = TRUE; break; } ++ $result = $res_779; ++ $this->pos = $pos_779; ++ $_814 = FALSE; break; + } + while(0); +- if( $_791 === FALSE) { $_793 = FALSE; break; } +- $_793 = TRUE; break; ++ if( $_814 === FALSE) { $_816 = FALSE; break; } ++ $_816 = TRUE; break; + } + while(0); +- if( $_793 === FALSE) { +- $result = $res_794; +- $this->pos = $pos_794; +- unset( $res_794 ); +- unset( $pos_794 ); ++ if( $_816 === FALSE) { ++ $result = $res_817; ++ $this->pos = $pos_817; ++ unset( $res_817 ); ++ unset( $pos_817 ); + break; + } + $count += 1; +diff --git a/tests/php/View/SSViewerTest.php b/tests/php/View/SSViewerTest.php +index 344abd88ecf..de9465e628a 100644 +--- a/tests/php/View/SSViewerTest.php ++++ b/tests/php/View/SSViewerTest.php +@@ -377,6 +377,15 @@ public function testBasicInjection() + ); + } + ++ /** ++ * @expectedException SilverStripe\View\SSTemplateParseException ++ * @expectedExceptionMessageRegExp /Malformed bracket injection {\$Value(.*)/ ++ */ ++ public function testBasicInjectionMismatchedBrackets() ++ { ++ $this->render('A {$Value here'); ++ $this->fail(""Parser didn't error when encountering mismatched brackets in an injection""); ++ } + + public function testGlobalVariableCalls() + { +",0 +ab17ed4e70cc8cd8337846525a3694d81fffff32,https://github.com/pfsense/pfsense/commit/ab17ed4e70cc8cd8337846525a3694d81fffff32,"support mitigating BEAST attack + +According to http://redmine.lighttpd.net/projects/lighttpd/wiki/Release-1_4_30 + +""...by setting + +ssl.cipher-list = ""ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM"" + +you can mitigate BEAST attacks.""","diff --git a/etc/inc/system.inc b/etc/inc/system.inc +index 0a5fba5bcbb..876dba6749f 100644 +--- a/etc/inc/system.inc ++++ b/etc/inc/system.inc +@@ -1184,7 +1184,8 @@ EOD; + + // Harden SSL a bit for PCI conformance testing + $lighty_config .= ""ssl.use-sslv2 = \""disable\""\n""; +- $lighty_config .= ""ssl.cipher-list = \""DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:CAMELLIA256-SHA:DHE-DSS-AES256-SHA:AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:CAMELLIA128-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:AES128-SHA:RC4-SHA:RC4-MD5:!aNULL:!eNULL:!3DES:@STRENGTH\""\n""; ++ $lighty_config .= ""ssl.honor-cipher-order = \""enable\""\n""; ++ $lighty_config .= ""ssl.cipher-list = \""ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM\""\n""; + + if(!(empty($ca) || (strlen(trim($ca)) == 0))) + $lighty_config .= ""ssl.ca-file = \""{$g['varetc_path']}/{$ca_location}\""\n\n""; +",1 +1b5a6c701b781a632e1364d6865946ee94a9002a,https://github.com/wolfcms/wolfcms/commit/1b5a6c701b781a632e1364d6865946ee94a9002a,Replace PHP5.4 notation by PHP5.3 notation,"diff --git a/README.md b/README.md +index c228b3e2..e1e179a1 100644 +--- a/README.md ++++ b/README.md +@@ -2,7 +2,7 @@ + + ## About Wolf CMS + +-[![Current Version](http://img.shields.io/badge/wolfcms-v0.8.3-blue.svg)](http://www.wolfcms.org/download.html) ++[![Current Version](http://img.shields.io/badge/wolfcms-v0.8.3.1-blue.svg)](http://www.wolfcms.org/download.html) + [![Build Status](http://img.shields.io/travis/wolfcms/wolfcms/master.svg)](http://travis-ci.org/wolfcms/wolfcms) + [![Coverage Status](http://img.shields.io/coveralls/wolfcms/wolfcms/master.svg)](https://coveralls.io/r/wolfcms/wolfcms?branch=master) + [![Gittip Status](http://img.shields.io/gittip/Wolf%20CMS.svg)](https://www.gittip.com/Wolf%20CMS/) +diff --git a/index.php b/index.php +index 1ed3c8b2..ce2392de 100644 +--- a/index.php ++++ b/index.php +@@ -15,7 +15,7 @@ + // Constants --------------------------------------------------------------- + define('IN_CMS', true); + +-define('CMS_VERSION', '0.8.3'); ++define('CMS_VERSION', '0.8.3.1'); + define('CMS_ROOT', dirname(__FILE__)); + define('DS', DIRECTORY_SEPARATOR); + define('CORE_ROOT', CMS_ROOT.DS.'wolf'); +diff --git a/wolf/plugins/file_manager/FileManagerController.php b/wolf/plugins/file_manager/FileManagerController.php +index d98bb6bd..5e031cd1 100644 +--- a/wolf/plugins/file_manager/FileManagerController.php ++++ b/wolf/plugins/file_manager/FileManagerController.php +@@ -338,7 +338,8 @@ public function upload() { + $filename = preg_replace('/[^a-z0-9_\-\.]/i', '', $filename); + + $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); +- if (in_array($ext, ['php', 'php3', 'php4', 'inc'])) { ++ $ext_arr = array('php', 'php3', 'php4', 'inc'); ++ if (in_array($ext, $ext_arr)) { + Flash::set('error', __('Not allowed to upload files with extension :ext', $ext)); + redirect(get_url('plugin/file_manager/browse/')); + } +@@ -420,8 +421,9 @@ public function rename() { + + // Check if trying to rename to php file (.php / .php3 etc) + $ext = strtolower(pathinfo($data['new_name'], PATHINFO_EXTENSION)); ++ $ext_arr = array('php', 'php3', 'php4', 'inc'); + +- if (in_array($ext, ['php', 'php3', 'php4', 'inc'])) { ++ if (in_array($ext, $ext_arr)) { + Flash::set('error', __('Not allowed to rename to :ext', $ext)); + redirect(get_url('plugin/file_manager/browse/' . $path)); + } +",0 +b22bd287768735d9930100eccf985e69f65289fc,https://github.com/osCommerce/oscommerce/commit/b22bd287768735d9930100eccf985e69f65289fc,Remove case-sensitivity when checking file extensions,"diff --git a/osCommerce/OM/Core/DirectoryListing.php b/osCommerce/OM/Core/DirectoryListing.php +index bb8eda1d..f06f2c83 100644 +--- a/osCommerce/OM/Core/DirectoryListing.php ++++ b/osCommerce/OM/Core/DirectoryListing.php +@@ -75,7 +75,7 @@ public function setRecursive($boolean) { + } + + public function setCheckExtension($extension) { +- $this->_check_extension[] = $extension; ++ $this->_check_extension[] = strtolower($extension); + } + + public function setAddDirectoryToFilename($boolean) { +@@ -99,7 +99,7 @@ public function read($directory = '') { + while (($entry = $dir->read()) !== false) { + if (!in_array($entry, $this->_exclude_entries)) { + if (($this->_include_files === true) && is_file($dir->path . '/' . $entry)) { +- if (empty($this->_check_extension) || in_array(substr($entry, strrpos($entry, '.')+1), $this->_check_extension)) { ++ if (empty($this->_check_extension) || in_array(strtolower(substr($entry, strrpos($entry, '.')+1)), $this->_check_extension)) { + if ($this->_add_directory_to_filename === true) { + if ($dir->path != $this->_directory) { + $entry = substr($dir->path, strlen($this->_directory)+1) . '/' . $entry; +",0 +a095c1e54526c64c70c0af85900d64de3924b4bd,https://github.com/octobercms/october/commit/a095c1e54526c64c70c0af85900d64de3924b4bd,"temporary fix for Composer 2.0 compatibility. + +See https://github.com/wikimedia/composer-merge-plugin/pull/189","diff --git a/composer.json b/composer.json +index 01f9bfefc3..1ed70d1ad4 100644 +--- a/composer.json ++++ b/composer.json +@@ -30,6 +30,12 @@ + ""docs"": ""https://octobercms.com/docs/"", + ""source"": ""https://github.com/octobercms/october"" + }, ++ ""repositories"": [ ++ { ++ ""type"":""vcs"", ++ ""url"":""https://github.com/octoberrain/composer-merge-plugin"" ++ } ++ ], + ""require"": { + ""php"": "">=7.2"", + ""october/rain"": ""1.1.*"", +@@ -37,7 +43,7 @@ + ""october/backend"": ""1.1.*"", + ""october/cms"": ""1.1.*"", + ""laravel/framework"": ""~6.0"", +- ""wikimedia/composer-merge-plugin"": ""1.4.1"" ++ ""wikimedia/composer-merge-plugin"": ""dev-feature/composer-v2 as 1.5.0"" + }, + ""require-dev"": { + ""phpunit/phpunit"": ""^8.4|^9.3.3"", +",0 +1cf82e6ba08efb0e8179c964a1ef23d24b2b2938,https://github.com/TheHive-Project/Cortex/commit/1cf82e6ba08efb0e8179c964a1ef23d24b2b2938,#264 Fix OAuth scope config type,"diff --git a/app/org/thp/cortex/services/OAuth2Srv.scala b/app/org/thp/cortex/services/OAuth2Srv.scala +index ae30d3348..27ea7f9b6 100644 +--- a/app/org/thp/cortex/services/OAuth2Srv.scala ++++ b/app/org/thp/cortex/services/OAuth2Srv.scala +@@ -23,7 +23,7 @@ case class OAuth2Config( + authorizationUrl: String, + tokenUrl: String, + userUrl: String, +- scope: String, ++ scope: Seq[String], + authorizationHeader: String, + autoupdate: Boolean, + autocreate: Boolean +@@ -41,7 +41,7 @@ object OAuth2Config { + authorizationUrl <- configuration.getOptional[String](""auth.oauth2.authorizationUrl"") + tokenUrl <- configuration.getOptional[String](""auth.oauth2.tokenUrl"") + userUrl <- configuration.getOptional[String](""auth.oauth2.userUrl"") +- scope <- configuration.getOptional[String](""auth.oauth2.scope"") ++ scope <- configuration.getOptional[Seq[String]](""auth.oauth2.scope"") + authorizationHeader = configuration.getOptional[String](""auth.oauth2.authorizationHeader"").getOrElse(""Bearer"") + autocreate = configuration.getOptional[Boolean](""auth.sso.autocreate"").getOrElse(false) + autoupdate = configuration.getOptional[Boolean](""auth.sso.autoupdate"").getOrElse(false) +@@ -109,7 +109,7 @@ class OAuth2Srv( + private def authRedirect(oauth2Config: OAuth2Config): Result = { + val state = UUID.randomUUID().toString + val queryStringParams = Map[String, Seq[String]]( +- ""scope"" -> Seq(oauth2Config.scope), ++ ""scope"" -> Seq(oauth2Config.scope.mkString("" "")), + ""response_type"" -> Seq(oauth2Config.responseType), + ""redirect_uri"" -> Seq(oauth2Config.redirectUri), + ""client_id"" -> Seq(oauth2Config.clientId), +",0 +7646725130f3087574a39e8577ba399c42decfb6,https://github.com/glensc/file/commit/7646725130f3087574a39e8577ba399c42decfb6,PR/218: David Gilman: Add support for e2fsck undo files,"diff --git a/magic/Magdir/linux b/magic/Magdir/linux +index 8bf6219fc..3086191e6 100644 +--- a/magic/Magdir/linux ++++ b/magic/Magdir/linux +@@ -1,6 +1,6 @@ + + #------------------------------------------------------------------------------ +-# $File: linux,v 1.74 2020/12/12 20:01:47 christos Exp $ ++# $File: linux,v 1.75 2021/01/03 20:53:52 christos Exp $ + # linux: file(1) magic for Linux files + # + # Values for Linux/i386 binaries, from Daniel Quinlan +@@ -518,3 +518,15 @@ + 0 search/1024 /dts-v1/ Device Tree File (v1) + # beat c code + !:strength +14 ++ ++ ++# e2fsck undo file ++# David Gilman ++0 string E2UNDO02 e2fsck undo file, version 2 ++>44 lelong x \b, undo file is ++>>44 lelong&1 0 not finished ++>>44 lelong&1 1 finished ++>48 lelong x \b, undo file features: ++>>48 lelong&1 0 lacks filesystem offset ++>>48 lelong&1 1 has filesystem offset ++>>>64 lequad x at 0x%llx +",0 +f7f7c53904e27e591d921caf4f17d95775fbbc0e,https://github.com/apache/commons-compress/commit/f7f7c53904e27e591d921caf4f17d95775fbbc0e,Happy new year,"diff --git a/NOTICE.txt b/NOTICE.txt +index 63f8bd9e5..e3182cd3c 100644 +--- a/NOTICE.txt ++++ b/NOTICE.txt +@@ -1,5 +1,5 @@ + Apache Commons Compress +-Copyright 2002-2019 The Apache Software Foundation ++Copyright 2002-2020 The Apache Software Foundation + + This product includes software developed at + The Apache Software Foundation (https://www.apache.org/). +",0 +024be058ad70aa87e501c66485f0c20696a3063a,https://github.com/apache/santuario-java/commit/024be058ad70aa87e501c66485f0c20696a3063a,"[50248] - Concurrency problem on incomplete Init.init() calls. + + +git-svn-id: https://svn.apache.org/repos/asf/santuario/trunk@1033870 13f79535-47bb-0310-9956-ffa450edef68","diff --git a/CHANGELOG.txt b/CHANGELOG.txt +index 44f94e4fe..fc61f9965 100644 +--- a/CHANGELOG.txt ++++ b/CHANGELOG.txt +@@ -1,5 +1,6 @@ + Changelog for ""Apache xml-security"" + New in v1.4.4 ++ Fixed Bug 50248: Concurrency problem on incomplete Init.init() calls. Thanks to Oliver Moehrke. + Fixed Bug 50215: test_jsr105 target appears to fail certain tests because of changes to W3C xml-stylesheet spec + + New in v1.4.4-SNAPSHOT +diff --git a/doc/site/status.xml b/doc/site/status.xml +index 3742d48f4..8dc6cfc5b 100644 +--- a/doc/site/status.xml ++++ b/doc/site/status.xml +@@ -36,7 +36,11 @@ limitations under the License. + + + +- ++ ++ ++ Concurrency problem on incomplete Init.init() calls. ++ + + test_jsr105 target appears to fail certain tests because of changes to + W3C xml-stylesheet spec +diff --git a/src/org/apache/xml/security/Init.java b/src/org/apache/xml/security/Init.java +index 4eca70b2c..76141d908 100644 +--- a/src/org/apache/xml/security/Init.java ++++ b/src/org/apache/xml/security/Init.java +@@ -88,7 +88,6 @@ public synchronized static void init() { + long XX_configure_reg_transforms_end=0; + long XX_configure_reg_keyInfo_end=0; + long XX_configure_reg_keyResolver_start=0; +- _alreadyInitialized = true; + + try { + long XX_init_start = System.currentTimeMillis(); +@@ -400,6 +399,7 @@ public Object run() { + log.fatal(""Bad: "", e); + e.printStackTrace(); + } ++ _alreadyInitialized = true; + + } + +",0 +a817755828cd0bfd4b87b0eb5cec59ffe57d3c3e,https://github.com/BlackCatDevelopment/BlackCatCMS/commit/a817755828cd0bfd4b87b0eb5cec59ffe57d3c3e,fix for issue #384,"diff --git a/upload/templates/freshcat/js/backend.js b/upload/templates/freshcat/js/backend.js +index 2a393c2d..e4e07ff9 100644 +--- a/upload/templates/freshcat/js/backend.js ++++ b/upload/templates/freshcat/js/backend.js +@@ -6,70 +6,73 @@ + @package freshcat + + */ +-function getMethods(a){var b=[],c;for(c in a)try{""function""==typeof a[c]&&b.push(c+"": ""+a[c].toString())}catch(e){b.push(c+"": inaccessible"")}return b}function dump(a,b){var c="""";b||(b=0);for(var e="""",d=0;d \""""+d+'""\n';else c=""===>""+a+""<===(""+typeof a+"")"";return c};(function(a){a.fn.fc_set_tab_list=function(b){var c={toggle_speed:300,fc_list_forms:a("".fc_list_forms""),fc_list_add:a(""#fc_list_add"")};b=a.extend(c,b);return this.each(function(){var c=a(this),d=c.closest(""ul"").children(""li""),f=""fc_list_""+c.children(""input"").val(),g=a(""#""+f),h=a(""#fc_install_new"");b.fc_list_forms.not("":first"").slideUp(0);0===b.fc_list_add.size()?d.filter("":first"").addClass(""fc_active""):b.fc_list_add.unbind().click(function(){d.removeClass(""fc_active"");b.fc_list_forms.not(h).slideUp(0); +-h.slideDown(0);h.find(""ul.fc_groups_tabs a:first"").click();h.find(""input[type=text]:first"").focus();jQuery(""#addon_details"").html("""")});c.not("".fc_type_heading"").click(function(){d.removeClass(""fc_active"");c.addClass(""fc_active"");b.fc_list_forms.not(""#""+f).slideUp(0);g.slideDown(0);g.find(""ul.fc_groups_tabs a:first"").click();jQuery(""#fc_add_new_module"").hide()})})}})(jQuery);(function(a){a.fn.fc_toggle_element=function(b){b=a.extend({show_on_start:!1,toggle_speed:300},b);return this.each(function(){var c=a(this),e=""show"";if(c.is(""select"")){var d=c.children(""option:selected""),f=match_class_prefix(""show___"",d),e=""show"";if(""undefined""==typeof f||0===f.length)f=match_class_prefix(""hide___"",d),e=""hide"";""undefined""!=typeof f&&(g=a(""#""+f));!1===b.show_on_start?g.slideUp(0).addClass(""fc_inactive_element hidden"").removeClass(""fc_active_element""):g.slideDown(0).addClass(""fc_active_element"").removeClass(""fc_inactive_element hidden""); ++var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e \""""+e+'""\n';else c=""===>""+a+""<===(""+typeof a+"")"";return c};(function(a){a.fn.fc_set_tab_list=function(b){var c={toggle_speed:300,fc_list_forms:a("".fc_list_forms""),fc_list_add:a(""#fc_list_add"")};b=a.extend(c,b);return this.each(function(){var c=a(this),e=c.closest(""ul"").children(""li""),f=""fc_list_""+c.children(""input"").val(),g=a(""#""+f),h=a(""#fc_install_new"");b.fc_list_forms.not("":first"").slideUp(0);0===b.fc_list_add.size()?e.filter("":first"").addClass(""fc_active""):b.fc_list_add.unbind().click(function(){e.removeClass(""fc_active"");b.fc_list_forms.not(h).slideUp(0); ++h.slideDown(0);h.find(""ul.fc_groups_tabs a:first"").click();h.find(""input[type=text]:first"").focus();jQuery(""#addon_details"").html("""")});c.not("".fc_type_heading"").click(function(){e.removeClass(""fc_active"");c.addClass(""fc_active"");b.fc_list_forms.not(""#""+f).slideUp(0);g.slideDown(0);g.find(""ul.fc_groups_tabs a:first"").click();jQuery(""#fc_add_new_module"").hide()})})}})(jQuery);(function(a){a.fn.fc_toggle_element=function(b){b=a.extend({show_on_start:!1,toggle_speed:300},b);return this.each(function(){var c=a(this),d=""show"";if(c.is(""select"")){var e=c.children(""option:selected""),f=match_class_prefix(""show___"",e);d=""show"";if(""undefined""==typeof f||0===f.length)f=match_class_prefix(""hide___"",e),d=""hide"";""undefined""!=typeof f&&(g=a(""#""+f));!1===b.show_on_start?g.slideUp(0).addClass(""fc_inactive_element hidden"").removeClass(""fc_active_element""):g.slideDown(0).addClass(""fc_active_element"").removeClass(""fc_inactive_element hidden""); + c.change(function(){var d=c.children(""option:selected""),e=match_class_prefix(""show___"",d),f=""show"";if(""undefined""==typeof e||0===e.length)e=match_class_prefix(""hide___"",d),f=""hide"";""undefined""!=typeof e&&(g=a(""#""+e));""show""==f?g.removeClass(""hidden"").slideUp(0).slideDown(b.toggle_speed,function(){g.addClass(""fc_active_element"").removeClass(""fc_inactive_element"")}):g.slideUp(b.toggle_speed,function(){g.addClass(""fc_inactive_element hidden"").removeClass(""fc_active_element"")})}).change()}else if(c.is(""input:checkbox"")|| +-c.is(""input:radio"")){var g=a(""#""+c.prop(""rel"")),f=match_class_prefix(""show___"",c),e=""show"";if(""undefined""==typeof f||0===f.length)f=match_class_prefix(""hide___"",c),e=""hide"";""undefined""!=typeof f&&(g=a(""#""+f));""undefined""!=typeof g&&0');if(""undefined""==typeof b||""""==b)b=""Unknown error"";$("".fc_popup"").html(b);var c=set_popup_title();$("".fc_popup"").dialog({modal:!0,show:""fade"",closeOnEscape:!0,title:c,buttons:[{text:""Ok"",click:function(){$("".fc_popup"").dialog(""destroy"")},""class"":""submit""}]})} ++function return_error(a,b){""undefined""!=typeof a&&a.slideUp(1200,function(){a.remove()});0===$("".fc_popup"").size()&&$(""#fc_admin_header"").prepend('
');if(""undefined""==typeof b||""""==b)b=""Unknown error"";$("".fc_popup"").html(b);b=set_popup_title();$("".fc_popup"").dialog({modal:!0,show:""fade"",closeOnEscape:!0,title:b,buttons:[{text:""Ok"",click:function(){$("".fc_popup"").dialog(""destroy"")},""class"":""submit""}]})} + function return_success(a,b){""undefined""!=typeof b?(a.html(b).addClass(""fc_active""),setTimeout(function(){a.slideUp(1200,function(){a.remove()})},5E3)):a.slideUp(1200,function(){a.remove()})}function set_activity(a){""undefined""==typeof a&&(a=""Loading"");var b=$('
').appendTo(""#fc_activity"");b.slideUp(0,function(){b.html('
'+cattranslate(a)+'
').slideDown(300)});return b} + function set_popup_title(){var a=""undefined""!=typeof cattranslate?cattranslate(""Notification""):""Notification"";0<$("".fc_popup .fc_popup_header"").size()&&(a=$("".fc_popup .fc_popup_header"").text(),$("".fc_popup .fc_popup_header"").remove());return a} +-function dialog_confirm(a,b,c,e,d,f,g,h,k){0===$("".fc_popup"").size()&&$(""#fc_admin_header"").prepend('
');""undefined""!=typeof cattranslate&&(a=cattranslate(a),b=cattranslate(b));$("".fc_popup"").html(a);c=""undefined""==typeof c||!1===c?alert(""You sent an invalid url""):c;d=""undefined""==typeof d||!1===d?""POST"":d;f=""undefined""==typeof f||!1===f?""JSON"":f;k=""undefined""==typeof k||!1===k?$(""document.body""):k;b=""undefined""==typeof b||!1===b?set_popup_title():b;buttonsOpts=[];e._cat_ajax= +-1;buttonsOpts.push({text:cattranslate(""Yes""),click:function(){$.ajax({type:d,context:k,url:c,dataType:f,data:e,cache:!1,beforeSend:function(a){a.process=set_activity(b);$("".fc_popup"").dialog(""destroy"").remove();""undefined""!=typeof g&&!1!==g&&g.call(this,a)},success:function(a,b,c){!0===a.success||0<$(a).find("".fc_success_box"").size()?return_success(c.process,a.message):return_error(c.process,a.message);""undefined""!=typeof h&&!1!==h&&h.call(this,a)}})},""class"":""submit""});buttonsOpts.push({text:cattranslate(""No""), ++function dialog_confirm(a,b,c,d,e,f,g,h,k){0===$("".fc_popup"").size()&&$(""#fc_admin_header"").prepend('
');""undefined""!=typeof cattranslate&&(a=cattranslate(a),b=cattranslate(b));$("".fc_popup"").html(a);c=""undefined""==typeof c||!1===c?alert(""You sent an invalid url""):c;e=""undefined""==typeof e||!1===e?""POST"":e;f=""undefined""==typeof f||!1===f?""JSON"":f;k=""undefined""==typeof k||!1===k?$(""document.body""):k;b=""undefined""==typeof b||!1===b?set_popup_title():b;buttonsOpts=[];d._cat_ajax= ++1;buttonsOpts.push({text:cattranslate(""Yes""),click:function(){$.ajax({type:e,context:k,url:c,dataType:f,data:d,cache:!1,beforeSend:function(a){a.process=set_activity(b);$("".fc_popup"").dialog(""destroy"").remove();""undefined""!=typeof g&&!1!==g&&g.call(this,a)},success:function(a,b,c){!0===a.success||0<$(a).find("".fc_success_box"").size()?return_success(c.process,a.message):return_error(c.process,a.message);""undefined""!=typeof h&&!1!==h&&h.call(this,a)}})},""class"":""submit""});buttonsOpts.push({text:cattranslate(""No""), + click:function(){$("".fc_popup"").dialog(""destroy"")},""class"":""reset""});$("".fc_popup"").dialog({modal:!0,show:""fade"",closeOnEscape:!0,title:b,buttons:buttonsOpts})} +-function dialog_ajax(a,b,c,e,d,f,g,h){b=""undefined""==typeof b||!1===b?alert(""You send an invalid url""):b;e=""undefined""==typeof e||!1===e?""POST"":e;d=""undefined""==typeof d||!1===d?""JSON"":d;h=""undefined""==typeof h||!1===h?$(""document.body""):h;a=""undefined""==typeof a||!1===a?set_popup_title():a;c._cat_ajax=1;$.ajax({type:e,url:b,dataType:d,context:h,data:c,beforeSend:function(b){$("".fc_popup"").remove();b.process=set_activity(a);""undefined""!=typeof f&&!1!==f&&f.call(this)},success:function(a,b,c){return_success(c.process, ++function dialog_ajax(a,b,c,d,e,f,g,h){b=""undefined""==typeof b||!1===b?alert(""You send an invalid url""):b;d=""undefined""==typeof d||!1===d?""POST"":d;e=""undefined""==typeof e||!1===e?""JSON"":e;h=""undefined""==typeof h||!1===h?$(""document.body""):h;a=""undefined""==typeof a||!1===a?set_popup_title():a;c._cat_ajax=1;$.ajax({type:d,url:b,dataType:e,context:h,data:c,beforeSend:function(b){$("".fc_popup"").remove();b.process=set_activity(a);""undefined""!=typeof f&&!1!==f&&f.call(this)},success:function(a,b,c){return_success(c.process, + a.message);!0===a.success?""undefined""!=typeof g&&!1!==g&&g.call(this,a):return_error(c.process,a.message)}})} +-function dialog_form(a,b,c,e,d){""undefined""==typeof e&&(e=""json"");a.submit(function(f){f.preventDefault();a.ajaxSubmit({context:a,dataType:e,beforeSerialize:function(a,b){""undefined""!=typeof d&&!1!==d&&d.call(this,a,b)},beforeSend:function(c,d,e){var f=0"";""deleted""==b.visibility?(e.find(""nav, ul, .fc_changePageOnly, .fc_addPageOnly"").hide(),e.find("".fc_restorePageOnly"").show()):(null!==b.parent_list&&a.each(b.parent_list,function(a,b){g=g+'
"").prependTo(""#fc_search_tree"");a(""#fc_searchOption"").click(function(){c("""");f.show().val("""").focus()})}var f=a(this);f.val("""").hide(); +-f.keyup(function(g){switch(g.keyCode){case 40:b.options_ul.find(""li:last"").hasClass(""fc_activeSearchOption"")||a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption"").next(""li"").addClass(""fc_activeSearchOption"");c(f.val());break;case 38:b.options_ul.find(""li:first"").hasClass(""fc_activeSearchOption"")||a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption"").prev(""li"").addClass(""fc_activeSearchOption"");c(f.val());break;case 13:d();f.val("""").hide().blur();break;default:g=f.val(),""""!== +-g&&c(g)}});b.defaultValue.click(function(){b.defaultValue.hide();c("""");f.show().val("""").focus()});f.blur(function(){setTimeout(function(){var c=f.val();0===a(""#fc_searchOption"").size()&&""""===c?b.defaultValue.show():0===a(""#fc_searchOption"").size()&&(d(),f.val("""").hide());b.options_ul.slideUp(300)},300)});a(""#fc_search_tree .fc_close"").click(function(){c("""");f.show().val("""").focus()});b.options_ul.find(""li"").click(function(){a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption"");a(this).addClass(""fc_activeSearchOption""); +-d();b.options_ul.slideUp(300);f.hide().val("""")})})}})(jQuery); +-jQuery(document).ready(function(){$(""#fc_sidebar, #fc_add_page"").page_tree();$(""#fc_search_page_tree"").page_treeSearch();$(""fc_page_tree_not_editable > a"").click(function(a){a.preventDefault()});$(""#fc_add_page"").slideUp(0);$("".fc_side_home"").click(function(a){a.preventDefault();window.open(CAT_URL)});$(""#fc_addPageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form"");a=$("".page_tree_open_options"");var b=[],c=[];$(""#fc_addPage_admin_groups"").children(""input:checked"").each(function(){b.push($(this).val())});$(""#fc_addPage_viewers_groups"").children(""input:checked"").each(function(){c.push($(this).val())}); +-var e={page_id:a.children(""input[name=page_id]"").val(),page_title:$(""#fc_addPage_page_title"").val(),menu_title:$(""#fc_addPage_title"").val(),page_link:$(""#fc_addPage_page_link"").val(),type:$(""#fc_addPage_type option:selected"").val(),parent:$(""#fc_addPage_parent option:selected"").val(),menu:$(""#fc_addPage_menu option:selected"").val(),target:$(""#fc_addPage_target option:selected"").val(),template:$(""#fc_addPage_template option:selected"").val(),variant:$(""#fc_default_template_variant option:selected"").val(), +-language:$(""#fc_addPage_language option:selected"").val(),description:$(""#fc_addPage_description"").val(),keywords:$(""#fc_addPage_keywords"").val(),searching:$(""#fc_addPage_Searching"").is("":checked"")?1:0,visibility:$(""#fc_addPage_visibility option:selected"").val(),page_groups:$(""#fc_addPage_page_groups"").val(),visibility:$(""#fc_addPage_visibility option:selected"").val(),auto_add_modules:$(""#fc_template_autoadd"").is("":checked"")?1:0,admin_groups:b,viewing_groups:c,_cat_ajax:1};$.ajax({context:a,type:""POST"", +-url:CAT_ADMIN_URL+""/pages/ajax_add_page.php"",dataType:""json"",data:e,cache:!1,beforeSend:function(a){a.process=set_activity(""Save page"")},success:function(a,b,c){!0===a.success?(return_success(c.process,a.message),$(this),window.location.replace(a.url)):return_error(c.process,a.message)}})});$(""#fc_savePageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form"");a=$("".page_tree_open_options"");var b=[],c=[];$(""#fc_addPage_admin_groups"").children(""input:checked"").each(function(){b.push($(this).val())}); +-$(""#fc_addPage_viewers_groups"").children(""input:checked"").each(function(){c.push($(this).val())});var e={page_id:a.children(""input[name=page_id]"").val(),page_title:$(""#fc_addPage_page_title"").val(),menu_title:$(""#fc_addPage_title"").val(),parent:$(""#fc_addPage_parent option:selected"").val(),menu:$(""#fc_addPage_menu option:selected"").val(),target:$(""#fc_addPage_target option:selected"").val(),template:$(""#fc_addPage_template option:selected"").val(),template_variant:$(""#fc_default_template_variant option:selected"").val(), ++(function(a){a.fn.page_treeSearch=function(b){var c={options_ul:a(""#fc_search_page_options""),page_tree:a(""#fc_page_tree_top""),defaultValue:a(""#fc_search_page_tree_default"")};b=a.extend(c,b);return this.each(function(){function c(c){c=c.replace(/(<([^>]+)>)/ig,"""");var e=b.page_tree.find(""li"");e.removeClass(""fc_activeSearch fc_inactiveSearch fc_matchedSearch"");b.page_tree.removeHighlight();if(0]+)>)/ig,"""");a('
'+e+""""+d+""
"").prependTo(""#fc_search_tree"");a(""#fc_searchOption"").click(function(){c("""");f.show().val("""").focus()})} ++var f=a(this);f.val("""").hide();f.keyup(function(d){switch(d.keyCode){case 40:b.options_ul.find(""li:last"").hasClass(""fc_activeSearchOption"")||a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption"").next(""li"").addClass(""fc_activeSearchOption"");c(f.val());break;case 38:b.options_ul.find(""li:first"").hasClass(""fc_activeSearchOption"")||a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption"").prev(""li"").addClass(""fc_activeSearchOption"");c(f.val());break;case 13:e();f.val("""").hide().blur(); ++break;default:d=f.val(),""""!==d&&c(d)}});b.defaultValue.click(function(){b.defaultValue.hide();c("""");f.show().val("""").focus()});f.blur(function(){setTimeout(function(){var c=f.val();0===a(""#fc_searchOption"").size()&&""""===c?b.defaultValue.show():0===a(""#fc_searchOption"").size()&&(e(),f.val("""").hide());b.options_ul.slideUp(300)},300)});a(""#fc_search_tree .fc_close"").click(function(){c("""");f.show().val("""").focus()});b.options_ul.find(""li"").click(function(){a("".fc_activeSearchOption"").removeClass(""fc_activeSearchOption""); ++a(this).addClass(""fc_activeSearchOption"");e();b.options_ul.slideUp(300);f.hide().val("""")})})}})(jQuery); ++jQuery(document).ready(function(){$(""#fc_sidebar, #fc_add_page"").page_tree();$(""#fc_search_page_tree"").page_treeSearch();$(""fc_page_tree_not_editable > a"").click(function(a){a.preventDefault()});$(""#fc_add_page"").slideUp(0);$("".fc_side_home"").click(function(a){a.preventDefault();window.open(CAT_URL)});$(""#fc_addPageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form"");a=$("".page_tree_open_options"");var b=[],c=[];$(""#fc_addPage_admin_groups"").children(""input:checked"").each(function(){b.push($(this).val())}); ++$(""#fc_addPage_viewers_groups"").children(""input:checked"").each(function(){c.push($(this).val())});var d={page_id:a.children(""input[name=page_id]"").val(),page_title:$(""#fc_addPage_page_title"").val(),menu_title:$(""#fc_addPage_title"").val(),page_link:$(""#fc_addPage_page_link"").val(),type:$(""#fc_addPage_type option:selected"").val(),parent:$(""#fc_addPage_parent option:selected"").val(),menu:$(""#fc_addPage_menu option:selected"").val(),target:$(""#fc_addPage_target option:selected"").val(),template:$(""#fc_addPage_template option:selected"").val(), ++variant:$(""#fc_default_template_variant option:selected"").val(),language:$(""#fc_addPage_language option:selected"").val(),description:$(""#fc_addPage_description"").val(),keywords:$(""#fc_addPage_keywords"").val(),searching:$(""#fc_addPage_Searching"").is("":checked"")?1:0,visibility:$(""#fc_addPage_visibility option:selected"").val(),page_groups:$(""#fc_addPage_page_groups"").val(),visibility:$(""#fc_addPage_visibility option:selected"").val(),auto_add_modules:$(""#fc_template_autoadd"").is("":checked"")?1:0,admin_groups:b, ++viewing_groups:c,_cat_ajax:1};$.ajax({context:a,type:""POST"",url:CAT_ADMIN_URL+""/pages/ajax_add_page.php"",dataType:""json"",data:d,cache:!1,beforeSend:function(a){a.process=set_activity(""Save page"")},success:function(a,b,c){!0===a.success?(return_success(c.process,a.message),$(this),window.location.replace(a.url)):return_error(c.process,a.message)}})});$(""#fc_savePageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form"");a=$("".page_tree_open_options"");var b=[],c=[];$(""#fc_addPage_admin_groups"").children(""input:checked"").each(function(){b.push($(this).val())}); ++$(""#fc_addPage_viewers_groups"").children(""input:checked"").each(function(){c.push($(this).val())});var d={page_id:a.children(""input[name=page_id]"").val(),page_title:$(""#fc_addPage_page_title"").val(),menu_title:$(""#fc_addPage_title"").val(),parent:$(""#fc_addPage_parent option:selected"").val(),menu:$(""#fc_addPage_menu option:selected"").val(),target:$(""#fc_addPage_target option:selected"").val(),template:$(""#fc_addPage_template option:selected"").val(),template_variant:$(""#fc_default_template_variant option:selected"").val(), + language:$(""#fc_addPage_language option:selected"").val(),page_link:$(""#fc_addPage_page_link"").val(),description:$(""#fc_addPage_description"").val(),keywords:$(""#fc_addPage_keywords"").val(),searching:$(""#fc_addPage_Searching"").is("":checked"")?1:0,visibility:$(""#fc_addPage_visibility option:selected"").val(),page_groups:$(""#fc_addPage_page_groups"").val(),visibility:$(""#fc_addPage_visibility option:selected"").val(),admin_groups:b,viewing_groups:c,_cat_ajax:1};$.ajax({context:a,type:""POST"",url:CAT_ADMIN_URL+ +-""/pages/ajax_settings_save.php"",dataType:""json"",data:e,cache:!1,beforeSend:function(a){a.process=set_activity(cattranslate(""Saving page""))},success:function(a,b,c){if(!0===a.success){return_success(c.process,a.message);b=$(this);c=$(""#pageid_""+a.parent);var h=b.parent().closest(""li"");$(""#fc_add_page button:reset"").click();switch(a.visibility){case ""public"":var k=""icon-screen"";break;case ""private"":k=""icon-key"";break;case ""registered"":k=""icon-users"";break;case ""hidden"":k=""icon-eye-2"";break;case ""deleted"":k= +-""icon-remove"";break;default:k=""icon-eye-blocked""}e.parent!=h.children(""input[name=page_id]"").val()&&(0===e.parent?$(""#fc_page_tree_top"").children(""ul"").append(b):0'),$('
    ').appendTo(c).append(b)),c.parentsUntil(""#fc_page_tree_top"",""li"").andSelf().addClass(""fc_expandable fc_tree_open"").removeClass(""fc_tree_close"")); +-b.children(""dl"").children("".fc_search_MenuTitle"").text(a.menu_title);b.children(""dl"").children("".fc_search_PageTitle"").text(a.page_title);b.children("".fc_page_link"").children(""a"").children("".fc_page_tree_menu_title"").removeClass().addClass(""fc_page_tree_menu_title ""+k).text("" ""+a.menu_title);b.children("".fc_page_link > a:first"").prop(""title"",""Page title: ""+a.page_title)}else return_error(c.process,a.message)}})});$(""#fc_removePageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form""); +-a=$("".page_tree_open_options"");var b=a.find(""input[name=page_id]"").val(),c=$(""div#fc_add_module"").find('input[name=""page_id""]').val(),e={page_id:b,_cat_ajax:1};dialog_confirm(cattranslate(""Do you really want to delete this page?""),cattranslate(""Remove page""),CAT_ADMIN_URL+""/pages/ajax_delete_page.php"",e,""POST"",""JSON"",!1,function(a,e,g){$(""#fc_add_page input[type=reset]"").click();e=$(this);g=e.prev();if(!0===a.success&&0===a.status){a=e.parent().parent().find("".fc_page_link"").find("".fc_toggle_tree""); +-var h=e.parent().parent();e.remove();0===h.find(""ul.ui-sortable"").children(""li"").length&&a.remove()}else e.find("".fc_page_link"").find("".fc_page_tree_menu_title"").removeClass().addClass(""fc_page_tree_menu_title icon-remove"");$(""#fc_add_page button:reset"").click();c==b&&(location.href=""undefined""!=typeof g?CAT_ADMIN_URL+""/pages/modify.php?page_id=""+g.prop(""id"").replace(""pageid_"",""""):CAT_ADMIN_URL+""/start/index.php"")},a)});$(""#fc_restorePageSubmit"").click(function(a){a.preventDefault();$(this).closest(""form""); +-a=$("".page_tree_open_options"");var b={page_id:a.children(""input[name=page_id]"").val(),_cat_ajax:1};dialog_ajax(""Restoring page"",CAT_ADMIN_URL+""/pages/ajax_restore_page.php"",b,""POST"",""JSON"",!1,function(a,b,d){$(""#fc_add_page input[type=reset]"").click();b=$(this);!0===a.success?b.find("".fc_page_link"").find("".fc_page_tree_menu_title"").removeClass().addClass(""fc_page_tree_menu_title icon-screen""):return_error(d.process,a.message)},a)});$(""#fc_addPageChildSubmit"").click(function(a){a.preventDefault(); +-$(""#fc_addPage_parent_page_id"").val($("".page_tree_open_options"").children(""input[name=page_id]"").val());$("".fc_side_add"").click()});$(""select[id=fc_addPage_template]"").change(function(){var a={_cat_ajax:1,template:$(""#fc_addPage_template"").val()};$.ajax({type:""POST"",url:CAT_ADMIN_URL+""/settings/ajax_get_template_variants.php"",dataType:""json"",data:a,cache:!1,success:function(a,c,e){!0===a.success?($(this),$(""#fc_default_template_variant"").empty(),0<$(a.variants).size()?($.each(a.variants,function(a, +-b){$(""