# HG changeset patch # User Franck Deroche # Date 1230039164 -3600 # Node ID 4347c45bb494b04925c91d14dac2bc736bc66a0e # Parent 626fcabfa4b83381ccff4c02c732fc35d5e8a4ff Drupal 6.7 diff -r 626fcabfa4b8 -r 4347c45bb494 .htaccess --- a/.htaccess Tue Dec 23 14:32:33 2008 +0100 +++ b/.htaccess Tue Dec 23 14:32:44 2008 +0100 @@ -3,7 +3,7 @@ # # Protect files and directories from prying eyes. - + Order allow,deny @@ -18,6 +18,7 @@ # Force simple error message for requests for non-existent favicon.ico. + # There is no end quote below, for compatibility with Apache 1.3. ErrorDocument 404 "The requested file favicon.ico was not found. @@ -106,4 +107,4 @@ RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] -# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $ +# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $ diff -r 626fcabfa4b8 -r 4347c45bb494 CHANGELOG.txt --- a/CHANGELOG.txt Tue Dec 23 14:32:33 2008 +0100 +++ b/CHANGELOG.txt Tue Dec 23 14:32:44 2008 +0100 @@ -1,4 +1,10 @@ -// $Id: CHANGELOG.txt,v 1.253.2.15 2008/10/22 19:26:00 goba Exp $ +// $Id: CHANGELOG.txt,v 1.253.2.18 2008/12/10 22:30:13 goba Exp $ + +Drupal 6.7, 2008-12-10 +---------------------- +- Fixed security issues, (Cross site request forgery and Cross site scripting), see SA-2008-073 +- Updated robots.txt and .htaccess to match current file use. +- Fixed a variety of small bugs. Drupal 6.6, 2008-10-22 ---------------------- @@ -86,6 +92,8 @@ ported to the correct core API version. * Can now specify the minimum PHP version required for a module within the .info file. + * Drupal core no longer requires CREATE TEMPORARY TABLES or LOCK TABLES + database rights. * Dynamically check password strength and confirmation. * Refactored poll administration. * Implemented drag-and-drop positioning for blocks, menu items, taxonomy @@ -142,6 +150,12 @@ - Removed old system updates. Updates from Drupal versions prior to 5.x will require upgrading to 5.x before upgrading to 6.x. +Drupal 5.13, 2008-12-10 +----------------------- +- fixed a variety of small bugs. +- fixed security issues, (Cross site request forgery and Cross site scripting), see SA-2008-073 +- updated robots.txt and .htaccess to match current file use. + Drupal 5.12, 2008-10-22 ----------------------- - fixed security issues, (File inclusion), see SA-2008-067 diff -r 626fcabfa4b8 -r 4347c45bb494 includes/bootstrap.inc --- a/includes/bootstrap.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/includes/bootstrap.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 0; $i--) { for ($j = count($server); $j > 0; $j--) { @@ -272,6 +267,21 @@ } /** + * Validate that $_SERVER['HTTP_HOST'] is safe. + * + * As $_SERVER['HTTP_HOST'] is user input, ensure it only contains characters + * allowed in hostnames. See RFC 952 (and RFC 2181). $_SERVER['HTTP_HOST'] is + * lowercased. + * + * @return + * TRUE if only containing valid characters, or FALSE otherwise. + */ +function drupal_valid_http_host() { + $_SERVER['HTTP_HOST'] = strtolower($_SERVER['HTTP_HOST']); + return preg_match('/^\[?(?:[a-z0-9-:\]_]+\.?)+$/', $_SERVER['HTTP_HOST']); +} + +/** * Loads the configuration and sets the base URL, cookie domain, and * session name correctly. */ @@ -282,6 +292,12 @@ global $db_url, $db_prefix, $cookie_domain, $conf, $installed_profile, $update_free_access; $conf = array(); + if (!drupal_valid_http_host()) { + // HTTP_HOST is invalid, e.g. if containing slashes it may be an attack. + header('HTTP/1.1 400 Bad Request'); + exit; + } + if (file_exists('./'. conf_path() .'/settings.php')) { include_once './'. conf_path() .'/settings.php'; } @@ -305,9 +321,7 @@ // Create base URL $base_root = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; - // As $_SERVER['HTTP_HOST'] is user input, ensure it only contains - // characters allowed in hostnames. - $base_url = $base_root .= '://'. preg_replace('/[^a-z0-9-:._]/i', '', $_SERVER['HTTP_HOST']); + $base_url = $base_root .= '://'. $_SERVER['HTTP_HOST']; // $_SERVER['SCRIPT_NAME'] can, in contrast to $_SERVER['PHP_SELF'], not // be modified by a visitor. diff -r 626fcabfa4b8 -r 4347c45bb494 includes/common.inc --- a/includes/common.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/includes/common.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ request = $request; fwrite($fp, $request); @@ -665,7 +664,7 @@ /** * Translate strings to the page language or a given language. * - * All human-readable text that will be displayed somewhere within a page should + * Human-readable text that will be displayed somewhere within a page should * be run through the t() function. * * Examples: @@ -732,7 +731,7 @@ * $output .= '

'. t('Go to the contact page.', array('@contact-page' => url('contact'))) .'

'; * @endcode * - * Also avoid escaping quotation marks wherever possible. + * Avoid escaping quotation marks wherever possible. * * Incorrect: * @code @@ -744,6 +743,101 @@ * $output .= t("Don't click me."); * @endcode * + * Because t() is designed for handling code-based strings, in almost all + * cases, the actual string and not a variable must be passed through t(). + * + * Extraction of translations is done based on the strings contained in t() + * calls. If a variable is passed through t(), the content of the variable + * cannot be extracted from the file for translation. + * + * Incorrect: + * @code + * $message = 'An error occurred.'; + * drupal_set_message(t($message), 'error'); + * $output .= t($message); + * @endcode + * + * Correct: + * @code + * $message = t('An error occurred.'); + * drupal_set_message($message, 'error'); + * $output .= $message; + * @endcode + * + * The only case in which variables can be passed safely through t() is when + * code-based versions of the same strings will be passed through t() (or + * otherwise extracted) elsewhere. + * + * In some cases, modules may include strings in code that can't use t() + * calls. For example, a module may use an external PHP application that + * produces strings that are loaded into variables in Drupal for output. + * In these cases, module authors may include a dummy file that passes the + * relevant strings through t(). This approach will allow the strings to be + * extracted. + * + * Sample external (non-Drupal) code: + * @code + * class Time { + * public $yesterday = 'Yesterday'; + * public $today = 'Today'; + * public $tomorrow = 'Tomorrow'; + * } + * @endcode + * + * Sample dummy file. + * @code + * // Dummy function included in example.potx.inc. + * function example_potx() { + * $strings = array( + * t('Yesterday'), + * t('Today'), + * t('Tomorrow'), + * ); + * // No return value needed, since this is a dummy function. + * } + * @endcode + * + * Having passed strings through t() in a dummy function, it is then + * okay to pass variables through t(). + * + * Correct (if a dummy file was used): + * @code + * $time = new Time(); + * $output .= t($time->today); + * @endcode + * + * However tempting it is, custom data from user input or other non-code + * sources should not be passed through t(). Doing so leads to the following + * problems and errors: + * - The t() system doesn't support updates to existing strings. When user + * data is updated, the next time it's passed through t() a new record is + * created instead of an update. The database bloats over time and any + * existing translations are orphaned with each update. + * - The t() system assumes any data it receives is in English. User data may + * be in another language, producing translation errors. + * - The "Built-in interface" text group in the locale system is used to + * produce translations for storage in .po files. When non-code strings are + * passed through t(), they are added to this text group, which is rendered + * inaccurate since it is a mix of actual interface strings and various user + * input strings of uncertain origin. + * + * Incorrect: + * @code + * $item = item_load(); + * $output .= check_plain(t($item['title'])); + * @endcode + * + * Instead, translation of these data can be done through the locale system, + * either directly or through helper functions provided by contributed + * modules. + * @see hook_locale() + * + * During installation, st() is used in place of t(). Code that may be called + * during installation or during normal operation should use the get_t() + * helper function. + * @see st() + * @see get_t() + * * @param $string * A string containing the English string to translate. * @param $args @@ -1820,7 +1914,7 @@ $last = ''; while ($path != $last) { $last = $path; - $path = preg_replace('`(^|/)(?!../)([^/]+)/../`', '$1', $path); + $path = preg_replace('`(^|/)(?!\.\./)([^/]+)/\.\./`', '$1', $path); } return 'url('. $path .')'; } @@ -3537,7 +3631,16 @@ drupal_clear_css_cache(); drupal_clear_js_cache(); - system_theme_data(); + + // If invoked from update.php, we must not update the theme information in the + // database, or this will result in all themes being disabled. + if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') { + _system_theme_data(); + } + else { + system_theme_data(); + } + drupal_rebuild_theme_registry(); menu_rebuild(); node_types_rebuild(); diff -r 626fcabfa4b8 -r 4347c45bb494 includes/database.pgsql.inc --- a/includes/database.pgsql.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/includes/database.pgsql.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ $choice) { if (!isset($element[$key])) { - $element[$key] = array('#type' => 'checkbox', '#processed' => TRUE, '#title' => $choice, '#return_value' => $key, '#default_value' => isset($value[$key]), '#attributes' => $element['#attributes']); + $element[$key] = array( + '#type' => 'checkbox', + '#processed' => TRUE, + '#title' => $choice, + '#return_value' => $key, + '#default_value' => isset($value[$key]), + '#attributes' => $element['#attributes'], + '#ahah' => isset($element['#ahah']) ? $element['#ahah'] : NULL, + ); } } } diff -r 626fcabfa4b8 -r 4347c45bb494 includes/locale.inc --- a/includes/locale.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/includes/locale.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ $value) { + if (!locale_string_is_safe($value)) { + form_set_error('translations', t('The submitted string contains disallowed HTML: %string', array('%string' => $value))); + watchdog('locale', 'Attempted submission of a translation string with disallowed HTML: %string', array('%string' => $value), WATCHDOG_WARNING); + } + } +} + +/** * Process string editing form submissions. + * * Saves all translations of one string submitted from a form. */ function locale_translate_edit_form_submit($form, &$form_state) { @@ -1003,7 +1034,7 @@ } // Get status information on import process. - list($headerdone, $additions, $updates, $deletes) = _locale_import_one_string('db-report'); + list($headerdone, $additions, $updates, $deletes, $skips) = _locale_import_one_string('db-report'); if (!$headerdone) { drupal_set_message(t('The translation file %filename appears to have a missing or malformed header.', array('%filename' => $file->filename)), 'error'); @@ -1018,6 +1049,11 @@ drupal_set_message(t('The translation was successfully imported. There are %number newly created translated strings, %update strings were updated and %delete strings were removed.', array('%number' => $additions, '%update' => $updates, '%delete' => $deletes))); watchdog('locale', 'Imported %file into %locale: %number new strings added, %update updated and %delete removed.', array('%file' => $file->filename, '%locale' => $langcode, '%number' => $additions, '%update' => $updates, '%delete' => $deletes)); + if ($skips) { + $skip_message = format_plural($skips, 'One translation string was skipped because it contains disallowed HTML.', '@count translation strings were skipped because they contain disallowed HTML.'); + drupal_set_message($skip_message); + watchdog('locale', $skip_message, NULL, WATCHDOG_WARNING); + } return TRUE; } @@ -1207,7 +1243,7 @@ * Text group to import PO file into (eg. 'default' for interface translations) */ function _locale_import_one_string($op, $value = NULL, $mode = NULL, $lang = NULL, $file = NULL, $group = 'default') { - static $report = array(0, 0, 0); + static $report = array('additions' => 0, 'updates' => 0, 'deletes' => 0, 'skips' => 0); static $headerdone = FALSE; static $strings = array(); @@ -1223,7 +1259,7 @@ // Called at end of import to inform the user case 'db-report': - return array($headerdone, $report[0], $report[1], $report[2]); + return array($headerdone, $report['additions'], $report['updates'], $report['deletes'], $report['skips']); // Store the string we got in the database. case 'db-store': @@ -1302,19 +1338,24 @@ $lid = db_result(db_query("SELECT lid FROM {locales_source} WHERE source = '%s' AND textgroup = '%s'", $source, $textgroup)); if (!empty($translation)) { - if ($lid) { + // Skip this string unless it passes a check for dangerous code. + if (!locale_string_is_safe($translation)) { + $report['skips']++; + $lid = 0; + } + elseif ($lid) { // We have this source string saved already. db_query("UPDATE {locales_source} SET location = '%s' WHERE lid = %d", $location, $lid); $exists = (bool) db_result(db_query("SELECT lid FROM {locales_target} WHERE lid = %d AND language = '%s'", $lid, $langcode)); if (!$exists) { // No translation in this language. db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $langcode, $translation, $plid, $plural); - $report[0]++; + $report['additions']++; } else if ($mode == LOCALE_IMPORT_OVERWRITE) { // Translation exists, only overwrite if instructed. db_query("UPDATE {locales_target} SET translation = '%s', plid = %d, plural = %d WHERE language = '%s' AND lid = %d", $translation, $plid, $plural, $langcode, $lid); - $report[1]++; + $report['updates']++; } } else { @@ -1322,13 +1363,13 @@ db_query("INSERT INTO {locales_source} (location, source, textgroup) VALUES ('%s', '%s', '%s')", $location, $source, $textgroup); $lid = db_result(db_query("SELECT lid FROM {locales_source} WHERE source = '%s' AND textgroup = '%s'", $source, $textgroup)); db_query("INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (%d, '%s', '%s', %d, %d)", $lid, $langcode, $translation, $plid, $plural); - $report[0]++; + $report['additions']++; } } elseif ($mode == LOCALE_IMPORT_OVERWRITE) { // Empty translation, remove existing if instructed. db_query("DELETE FROM {locales_target} WHERE language = '%s' AND lid = %d AND plid = %d AND plural = %d", $translation, $langcode, $lid, $plid, $plural); - $report[2]++; + $report['deletes']++; } return $lid; diff -r 626fcabfa4b8 -r 4347c45bb494 includes/menu.inc --- a/includes/menu.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/includes/menu.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ Theme guide - * @see themeable + * @ingroup themeable */ /** @@ -261,6 +260,7 @@ * over how and when the preprocess functions are run. */ function _theme_process_registry(&$cache, $name, $type, $theme, $path) { + $result = array(); $function = $name .'_theme'; if (function_exists($function)) { $result = $function($cache, $type, $theme, $path); @@ -358,6 +358,26 @@ // Merge the newly created theme hooks into the existing cache. $cache = array_merge($cache, $result); } + + // Let themes have preprocess functions even if they didn't register a template. + if ($type == 'theme' || $type == 'base_theme') { + foreach ($cache as $hook => $info) { + // Check only if it's a template and not registered by the theme or engine. + if (!empty($info['template']) && empty($result[$hook])) { + if (!isset($info['preprocess functions'])) { + $cache[$hook]['preprocess functions'] = array(); + } + if (function_exists($name .'_preprocess')) { + $cache[$hook]['preprocess functions'][] = $name .'_preprocess'; + } + if (function_exists($name .'_preprocess_'. $hook)) { + $cache[$hook]['preprocess functions'][] = $name .'_preprocess_'. $hook; + } + // Ensure uniqueness. + $cache[$hook]['preprocess functions'] = array_unique($cache[$hook]['preprocess functions']); + } + } + } } /** @@ -747,6 +767,12 @@ $templates[$hook] = array( 'function' => $prefix .'_'. $hook, ); + // Ensure that the pattern is maintained from base themes to its sub-themes. + // Each sub-theme will have their functions scanned so the pattern must be + // held for subsequent runs. + if (isset($info['pattern'])) { + $templates[$hook]['pattern'] = $info['pattern']; + } } } } @@ -812,6 +838,12 @@ 'path' => dirname($file->filename), ); } + // Ensure that the pattern is maintained from base themes to its sub-themes. + // Each sub-theme will have their templates scanned so the pattern must be + // held for subsequent runs. + if (isset($cache[$hook]['pattern'])) { + $templates[$hook]['pattern'] = $cache[$hook]['pattern']; + } } $patterns = array_keys($files); @@ -1409,10 +1441,10 @@ * All other elements are treated as attributes of the list item element. * @param $title * The title of the list. + * @param $type + * The type of list to return (e.g. "ul", "ol") * @param $attributes * The attributes applied to the list element. - * @param $type - * The type of list to return (e.g. "ul", "ol") * @return * A string containing the list output. */ diff -r 626fcabfa4b8 -r 4347c45bb494 modules/aggregator/aggregator.install --- a/modules/aggregator/aggregator.install Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/aggregator/aggregator.install Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 255, 'not null' => TRUE, 'default' => '', - 'description' => t('The parent website of the feed; comes from the element in the feed.'), + 'description' => t('The parent website of the feed; comes from the <link> element in the feed.'), ), 'description' => array( 'type' => 'text', 'not null' => TRUE, 'size' => 'big', - 'description' => t("The parent website's description; comes from the element in the feed."), + 'description' => t("The parent website's description; comes from the <description> element in the feed."), ), 'image' => array( 'type' => 'text', diff -r 626fcabfa4b8 -r 4347c45bb494 modules/block/block.admin.inc --- a/modules/block/block.admin.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/block/block.admin.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ '<'. t('none') .'>'); + // Weights range from -delta to +delta, so delta should be at least half + // of the amount of blocks present. This makes sure all blocks in the same + // region get an unique weight. + $weight_delta = round(count($blocks) / 2); + // Build form tree $form = array( - '#action' => arg(3) ? url('admin/build/block/list/'. $theme_key) : url('admin/build/block'), + '#action' => arg(4) ? url('admin/build/block/list/'. $theme_key) : url('admin/build/block'), '#tree' => TRUE, ); @@ -64,6 +69,7 @@ $form[$key]['weight'] = array( '#type' => 'weight', '#default_value' => $block['weight'], + '#delta' => $weight_delta, ); $form[$key]['region'] = array( '#type' => 'select', diff -r 626fcabfa4b8 -r 4347c45bb494 modules/block/block.install --- a/modules/block/block.install Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/block/block.install Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 64, 'not null' => TRUE, 'default' => '', - 'description' => t('Custom title for the block. (Empty string will use block default title, will remove the title, text will cause block to use specified title.)'), + 'description' => t('Custom title for the block. (Empty string will use block default title, <none> will remove the title, text will cause block to use specified title.)'), ), 'cache' => array( 'type' => 'int', diff -r 626fcabfa4b8 -r 4347c45bb494 modules/filter/filter.module --- a/modules/filter/filter.module Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/filter/filter.module Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ module, 'filter', 'list'); - if (isset($list) && is_array($list) && isset($list[$filter->delta])) { - $filter->name = $list[$filter->delta]; - $filters[$format][$filter->module .'/'. $filter->delta] = $filter; + if (db_affected_rows($result) == 0 && !db_result(db_query("SELECT 1 FROM {filter_formats} WHERE format = %d", $format))) { + // The format has no filters and does not exist, use the default input + // format. + $filters[$format] = filter_list_format(variable_get('filter_default_format', 1)); + } + else { + $filters[$format] = array(); + while ($filter = db_fetch_object($result)) { + $list = module_invoke($filter->module, 'filter', 'list'); + if (isset($list) && is_array($list) && isset($list[$filter->delta])) { + $filter->name = $list[$filter->delta]; + $filters[$format][$filter->module .'/'. $filter->delta] = $filter; + } } } } diff -r 626fcabfa4b8 -r 4347c45bb494 modules/forum/forum.module --- a/modules/forum/forum.module Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/forum/forum.module Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ ' ', 'field' => NULL), + NULL, array('data' => t('Topic'), 'field' => 'n.title'), array('data' => t('Replies'), 'field' => 'l.comment_count'), array('data' => t('Created'), 'field' => 'n.created'), diff -r 626fcabfa4b8 -r 4347c45bb494 modules/node/node.admin.inc --- a/modules/node/node.admin.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/node/node.admin.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 'submit', '#value' => t('Rebuild permissions'), + '#submit' => array('node_configure_access_submit'), ); } @@ -59,18 +60,14 @@ '#description' => t('Must users preview posts before submitting?'), ); - $form['#validate'] = array('node_configure_validate'); - return system_settings_form($form); } /** - * Form validate callback. + * Form button submit callback. */ -function node_configure_validate($form, &$form_state) { - if ($form_state['values']['op'] == t('Rebuild permissions')) { - drupal_goto('admin/content/node-settings/rebuild'); - } +function node_configure_access_submit($form, &$form_state) { + $form_state['redirect'] = 'admin/content/node-settings/rebuild'; } /** @@ -87,7 +84,6 @@ function node_configure_rebuild_confirm_submit($form, &$form_state) { node_access_rebuild(TRUE); $form_state['redirect'] = 'admin/content/node-settings'; - return; } /** diff -r 626fcabfa4b8 -r 4347c45bb494 modules/node/node.install --- a/modules/node/node.install Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/node/node.install Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ TRUE, 'default' => ''), 'module' => array( - 'description' => t('The module that implements this type.'), + 'description' => t('The base string used to construct callbacks corresponding to this node type.'), 'type' => 'varchar', 'length' => 255, 'not null' => TRUE), diff -r 626fcabfa4b8 -r 4347c45bb494 modules/node/node.pages.inc --- a/modules/node/node.pages.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/node/node.pages.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ '; foreach ($content as $item) { - $output .= '
'. l($item['title'], $item['href'], $item['options']) .'
'; + $output .= '
'. l($item['title'], $item['href'], $item['localized_options']) .'
'; $output .= '
'. filter_xss_admin($item['description']) .'
'; } $output .= ''; diff -r 626fcabfa4b8 -r 4347c45bb494 modules/path/path.admin.inc --- a/modules/path/path.admin.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/path/path.admin.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 'textfield', '#title' => t('Existing system path'), '#default_value' => $edit['src'], - '#maxlength' => 64, + '#maxlength' => 128, '#size' => 45, '#description' => t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), @@ -102,7 +102,7 @@ '#type' => 'textfield', '#title' => t('Path alias'), '#default_value' => $edit['dst'], - '#maxlength' => 64, + '#maxlength' => 128, '#size' => 45, '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='), @@ -198,7 +198,7 @@ '#type' => 'textfield', '#title' => '', '#default_value' => $keys, - '#maxlength' => 64, + '#maxlength' => 128, '#size' => 25, ); $form['basic']['inline']['submit'] = array( diff -r 626fcabfa4b8 -r 4347c45bb494 modules/path/path.module --- a/modules/path/path.module Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/path/path.module Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ 'textfield', '#default_value' => $path, - '#maxlength' => 250, + '#maxlength' => 128, '#collapsible' => TRUE, '#collapsed' => TRUE, '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'), diff -r 626fcabfa4b8 -r 4347c45bb494 modules/system/system.admin.inc --- a/modules/system/system.admin.inc Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/system/system.admin.inc Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ array('system_clear_cache_submit'), ); - $form['#submit'][] = 'drupal_clear_css_cache'; - $form['#submit'][] = 'drupal_clear_js_cache'; - return system_settings_form($form); } diff -r 626fcabfa4b8 -r 4347c45bb494 modules/system/system.module --- a/modules/system/system.module Tue Dec 23 14:32:33 2008 +0100 +++ b/modules/system/system.module Tue Dec 23 14:32:44 2008 +0100 @@ -1,5 +1,5 @@ Use this utility to update your database whenever a new release of Drupal or a module is installed.

For more detailed information, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

'; $output .= "
    \n"; $output .= "
  1. Back up your database. This process will change your database values and in case of emergency you may need to revert to a backup.
  2. \n"; @@ -377,7 +378,7 @@ $output .= "
  3. Install your new files in the appropriate location, as described in the handbook.
  4. \n"; $output .= "
\n"; $output .= "

When you have performed the steps above, you may proceed.

\n"; - $output .= '
'; + $output .= '
'; $output .= "\n"; return $output; } @@ -448,7 +449,7 @@ // Store values of expensive functions for future use. if (empty($themes) || empty($modules)) { - $themes = system_theme_data(); + $themes = _system_theme_data(); $modules = module_rebuild_cache(); } @@ -627,19 +628,23 @@ $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : ''; switch ($op) { + case 'selection': + if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { + $output = update_selection_page(); + break; + } + + case 'Update': + if (isset($_GET['token']) && $_GET['token'] == drupal_get_token('update')) { + update_batch(); + break; + } + // update.php ops case 'info': $output = update_info_page(); break; - case 'selection': - $output = update_selection_page(); - break; - - case 'Update': - update_batch(); - break; - case 'results': $output = update_results_page(); break;