]> git.mjollnir.org Git - s9y.git/commitdiff
Ensure to not be able to call s9y files under circumstances where .htaccess does...
authorgarvinhicking <garvinhicking>
Thu, 30 Nov 2006 21:34:33 +0000 (21:34 +0000)
committergarvinhicking <garvinhicking>
Thu, 30 Nov 2006 21:34:33 +0000 (21:34 +0000)
24 files changed:
docs/NEWS
include/admin/configuration.inc.php
include/admin/installer.inc.php
include/compat.inc.php
include/functions.inc.php
include/functions_calendars.inc.php
include/functions_comments.inc.php
include/functions_config.inc.php
include/functions_entries.inc.php
include/functions_entries_admin.inc.php
include/functions_images.inc.php
include/functions_installer.inc.php
include/functions_permalinks.inc.php
include/functions_plugins_admin.inc.php
include/functions_rss.inc.php
include/functions_smarty.inc.php
include/functions_trackbacks.inc.php
include/functions_upgrader.inc.php
include/genpage.inc.php
include/lang.inc.php
include/plugin_internal.inc.php
plugins/serendipity_event_xhtmlcleanup/UTF-8/lang_tn.inc.php
plugins/serendipity_event_xhtmlcleanup/lang_tn.inc.php
templates/kubrick/config.inc.php

index c964b60a281670be455646d272901419be88834a..7ad63e819e0e4f86632acaa62ba5346eac225008 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,5 +1,12 @@
 +# $Id$
 
+Version 1.0.4 ()
+------------------------------------------------------------------------
+
+   * Fix local file inclusion bug on systems with two conditions:
+     register_globals=on AND missing .htaccess for restricting access to
+    .inc.php files. (garvinhicking)
+             
 Version 1.0.3 (November 7th, 2006)
 ------------------------------------------------------------------------
 
index a4af5e2fa4e27d9a34a804e0881ae4bb21cbfc7e..4ecb2cfdc0a8c84aa89392f1fa8e1ff022ced9ec 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 umask(0000);
 $umask = 0775;
 @define('IN_installer', true);
@@ -47,7 +51,7 @@ switch ($_POST['installAction'] && serendipity_checkFormToken()) {
                         $permalinkNew[] = $serendipity[$permitem['var']];
                     }
                 }
-            }            
+            }
 
             if (serendipity_checkPermission('siteConfiguration') && serialize($permalinkOld) != serialize($permalinkNew)) {
                 printf(ATTEMPT_WRITE_FILE, $serendipity['serendipityPath'] . '.htaccess');
index 36ddc05d05d789cb7779a7e374e6d6420742f0a1..438aa35ef56e2f1ba6b7c05cb1cc277f71211608 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 umask(0000);
 $umask = 0775;
 @define('IN_installer', true);
index 5b95d91d1f57b11924dacca9668f49dba9601e49..a71769e8add4094b95b4da9e0615160cd7a12e5b 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 $serendipity = array();
 @ini_set('magic_quotes_runtime', 'off');
 
@@ -33,11 +37,11 @@ function memSnap($tshow = '') {
     static $avail    = null;
     static $show     = true;
     static $memUsage = 0;
-    
+
     if (!$show) {
         return false;
     }
-    
+
     if ($avail === false) {
         return true;
     } elseif ($avail === null) {
@@ -48,11 +52,11 @@ function memSnap($tshow = '') {
             return false;
         }
     }
-    
+
     if ($memUsage === 0) {
         $memUsage = $avail;
     }
-    
+
     $current = memory_get_usage();
     echo '[' . date('d.m.Y H:i') . '] ' . number_format($current - $memUsage, 2, ',', '.') . ' label "' . $tshow . '", totalling ' . number_format($current, 2, ',', '.') . '<br />' . "\n";
     $memUsage = $current;
index 0401053645ce3a9452ccfe72587a644d985c3de3..dc21e363451dab86343f225172e7cb712e42fd7d 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 $serendipity['imageList'] = array();
 include_once(S9Y_INCLUDE_PATH . "include/db/db.inc.php");
 include_once(S9Y_INCLUDE_PATH . "include/compat.inc.php");
index e347b5f955ab2fd78e6fde43fc6ac1bf9a879ba0..7ba735adacf3d7cc36219769171f5a714742dd56 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Gregorian to Jalali Convertor
  *
 function g2j($g_y, $g_m, $g_d){
     $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
     $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
-    
+
     $gy = $g_y-1600;
     $gm = $g_m-1;
     $gd = $g_d-1;
-    
+
     $g_day_no = 365*$gy+floor(($gy+3)/4)-floor(($gy+99)/100)+floor(($gy+399)/400);
-    
+
     for ($i=0; $i < $gm; ++$i){
         $g_day_no += $g_days_in_month[$i];
     }
-        
+
     if ($gm>1 && (($gy%4==0 && $gy%100!=0) || ($gy%400==0))){
         /* leap and after Feb */
         ++$g_day_no;
     }
-        
+
     $g_day_no += $gd;
     $j_day_no = $g_day_no-79;
     $j_np = floor($j_day_no/12053);
     $j_day_no %= 12053;
     $jy = 979+33*$j_np+4*floor($j_day_no/1461);
     $j_day_no %= 1461;
-    
+
     if ($j_day_no >= 366) {
         $jy += floor(($j_day_no-1)/365);
         $j_day_no = ($j_day_no-1)%365;
     }
     $j_all_days = $j_day_no+1;
-    
+
     for ($i = 0; $i < 11 && $j_day_no >= $j_days_in_month[$i]; ++$i) {
         $j_day_no -= $j_days_in_month[$i];
     }
-    
+
     $jm = $i+1;
     $jd = $j_day_no+1;
-    
+
     return array($jy, $jm, $jd, $j_all_days);
 }
 
@@ -102,10 +106,10 @@ function j2g($j_y, $j_m, $j_d){
     }
     $gm = $i+1;
     $gd = $g_day_no+1;
-        
+
     return array($gy, $gm, $gd);
 }
-    
+
 /**
  * Format a string according to Jalali calendar (UTF)
  *
@@ -116,7 +120,7 @@ function j2g($j_y, $j_m, $j_d){
  * @return  string  Formatted local time/date according to locale settings
  */
 function jalali_strftime_utf($format, $timestamp) {
-    
+
     $g_d=date('j', $timestamp);
     $g_m=date('n', $timestamp);
     $g_y=date('Y', $timestamp);
@@ -146,12 +150,12 @@ function jalali_strftime_utf($format, $timestamp) {
                            'Wed' => '5',
                            'Thu' => '6',
                            'Fri' => '7');
-    
+
     // calculate string
     $output_str='';
-    
+
     for ($i=0; $i<strlen($format); $i++){
-        
+
         if($format[$i]=='%'){
             $i++;
             switch($format[$i]){
@@ -247,7 +251,7 @@ function jalali_strftime_utf($format, $timestamp) {
             $output_str.=$format[$i];
         }
     }
-    
+
     return $output_str;
 }
 
@@ -261,16 +265,16 @@ function jalali_strftime_utf($format, $timestamp) {
  * @return  string  Formatted local time/date
  */
 function jalali_date_utf($format, $timestamp) {
-    
+
     $g_d=date('j', $timestamp);
     $g_m=date('n', $timestamp);
     $g_y=date('Y', $timestamp);
-    
+
     list($jy, $jm, $jd, $j_all_days) = g2j($g_y, $g_m, $g_d);
-    
+
     $j_days_in_month = array(0, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);
     if(($g_y % 4) == 3) $j_days_in_month[12]++;
-    
+
     $j_month_name = array('', 'فروردین', 'اردیبهشت', 'خرداد', 'تیر',
             'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند');
     $j_week_name = array('Saturday' => 'شنبه',
@@ -294,12 +298,12 @@ function jalali_date_utf($format, $timestamp) {
                            'Wed' => '5',
                            'Thu' => '6',
                            'Fri' => '7');
-    
+
     // calculate string
     $output_str='';
-    
+
     for ($i=0; $i<strlen($format); $i++){
-        
+
         if($format[$i]!='\\'){
             switch($format[$i]){
                 case 'd':
@@ -398,7 +402,7 @@ function jalali_date_utf($format, $timestamp) {
             $output_str.=$format[$i];
         }
     }
-    
+
     return $output_str;
 }
 
index b8d58e8b259f43be50b9ae09d5529ae0703c45d1..dae3690be629b7a276a294ba110a593cc7fe5678 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Store the personal details of a commenting user in a cookie (or delete that cookie)
  *
index 34509e0c6e224209f403e26ad7d094db4175d436..30a13ab8c3642f36a2214cce7f6f23285caadb9b 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Adds a new author account
  *
index 0b69b6f35b8211df4faa2a07814073351b486d7b..5bdba64d9cb6707ec44ea6585f6721e75500dfc1 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Delete a category or range of categories
  *
index 1bbea8b59f7792171340056698f901f490815cbc..4b8c2dccf0a5b049a276332dc8db61ebeb11e94c 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 include_once(S9Y_INCLUDE_PATH . "include/functions_trackbacks.inc.php");
 
 /**
index 2287881080c3c2fa838df8b9f1717e206463f59c..018ebe44eb140dabc5efceeae5a03af9a281fdc3 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Check if an uploaded file is "evil"
  *
index f0553b4d35a4e6e4239ea6b1e8d71b13e8f6d19f..49d9119755349a8db63f9d5f369bce5cb37d5482 100644 (file)
@@ -2,6 +2,9 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
 
 /**
  * Convert a PHP Ini setting to a boolean flag
@@ -764,7 +767,6 @@ function serendipity_installFiles($serendipity_core = '') {
         $htaccess_cgi = '';
     }
 
-
     /* Detect comptability with php_value directives */
     if ($htaccess_cgi == '') {
         $response = '';
index b97dd052d4ae626f304a8e448df913ae133e8e5b..324c3cdc9704cd350fa42a0a7dbcffbff3af1368 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Converts a string into a filename that can be used safely in HTTP URLs
  *
@@ -131,7 +135,7 @@ function serendipity_makeFilename($str, $stripDots = false) {
 
     // Remove excess separators
     $str = trim($str, $to[0]);
-    
+
     if (empty($str)) {
         if (isset($GLOBALS['i18n_unknown'])) {
             $str = $GLOBALS['i18n_unknown'];
@@ -155,67 +159,67 @@ function serendipity_initPermalinks() {
     if (!isset($serendipity['permalinkStructure'])) {
         $serendipity['permalinkStructure'] = 'archives/%id%-%title%.html';
     }
-    
+
     if (!isset($serendipity['permalinkFeedAuthorStructure'])) {
         $serendipity['permalinkFeedAuthorStructure'] = 'feeds/authors/%id%-%realname%.rss';
     }
-    
+
     if (!isset($serendipity['permalinkFeedCategoryStructure'])) {
         $serendipity['permalinkFeedCategoryStructure'] = 'feeds/categories/%id%-%name%.rss';
     }
-    
+
     if (!isset($serendipity['permalinkCategoryStructure'])) {
         $serendipity['permalinkCategoryStructure'] = 'categories/%id%-%name%';
     }
-    
+
     if (!isset($serendipity['permalinkAuthorStructure'])) {
         $serendipity['permalinkAuthorStructure'] = 'authors/%id%-%realname%';
     }
-    
+
     if (!isset($serendipity['permalinkArchivesPath'])) {
         $serendipity['permalinkArchivesPath'] = 'archives';
     }
-    
+
     if (!isset($serendipity['permalinkArchivePath'])) {
         $serendipity['permalinkArchivePath'] = 'archive';
     }
-    
+
     if (!isset($serendipity['permalinkCategoriesPath'])) {
         $serendipity['permalinkCategoriesPath'] = 'categories';
     }
-    
+
     if (!isset($serendipity['permalinkAuthorsPath'])) {
         $serendipity['permalinkAuthorsPath'] = 'authors';
     }
-    
+
     if (!isset($serendipity['permalinkUnsubscribePath'])) {
         $serendipity['permalinkUnsubscribePath'] = 'unsubscribe';
     }
-    
+
     if (!isset($serendipity['permalinkDeletePath'])) {
         $serendipity['permalinkDeletePath'] = 'delete';
     }
-    
+
     if (!isset($serendipity['permalinkApprovePath'])) {
         $serendipity['permalinkApprovePath'] = 'approve';
     }
-    
+
     if (!isset($serendipity['permalinkFeedsPath'])) {
         $serendipity['permalinkFeedsPath'] = 'feeds';
     }
-    
+
     if (!isset($serendipity['permalinkPluginPath'])) {
         $serendipity['permalinkPluginPath'] = 'plugin';
     }
-    
+
     if (!isset($serendipity['permalinkAdminPath'])) {
         $serendipity['permalinkAdminPath'] = 'admin';
     }
-    
+
     if (!isset($serendipity['permalinkSearchPath'])) {
         $serendipity['permalinkSearchPath'] = 'search';
     }
-    
+
     /* URI paths
      * These could be defined in the language headers, except that would break
      * backwards URL compatibility
@@ -230,7 +234,7 @@ function serendipity_initPermalinks() {
     @define('PATH_PLUGIN',      $serendipity['permalinkPluginPath']);
     @define('PATH_ADMIN',       $serendipity['permalinkAdminPath']);
     @define('PATH_SEARCH',      $serendipity['permalinkSearchPath']);
-    
+
     /* URI patterns
      * Note that it's important to use @ as the pattern delimiter. DO NOT use shortcuts
      * like \d or \s, since mod_rewrite will use the regexps as well and chokes on them.
@@ -254,7 +258,7 @@ function serendipity_initPermalinks() {
  */
 function &serendipity_permalinkPatterns($return = false) {
     global $serendipity;
-    
+
     $PAT = array();
 
     $PAT['UNSUBSCRIBE']              = '@/'  . $serendipity['permalinkUnsubscribePath'].'/(.*)/([0-9]+)@';
@@ -318,7 +322,7 @@ function serendipity_searchPermalink($struct, $url, $default, $type = 'entry') {
         if (is_array($permalink)) {
             return $permalink['entry_id'];
         }
-    }    
+    }
 
     return $default;
 }
@@ -349,12 +353,12 @@ function serendipity_getPermalink(&$data, $type = 'entry') {
         case 'category':
             return serendipity_categoryURL($data, '', false);
             break;
-            
+
         case 'author':
             return serendipity_authorURL($data, '', false);
             break;
     }
-    
+
     return false;
 }
 
@@ -399,16 +403,16 @@ function serendipity_insertPermalink(&$data, $type = 'entry') {
         case 'entry':
             $idfield = 'id';
             break;
-            
+
         case 'author':
             $idfield = 'authorid';
             break;
-            
+
         case 'category':
             $idfield = 'categoryid';
             break;
     }
-    
+
     return(serendipity_db_query(sprintf("INSERT INTO {$serendipity['dbPrefix']}permalinks
                                                     (permalink, entry_id, type)
                                              VALUES ('%s', '%s', '%s')",
@@ -498,9 +502,9 @@ function serendipity_makePermalink($format, $data, $type = 'entry') {
                     $data['entry']['timestamp'] = time();
                 }
             }
-        
+
             $ts = serendipity_serverOffsetHour($data['entry']['timestamp']);
-        
+
             $replacements =
                 array(
                     (int)$data['id'],
@@ -511,7 +515,7 @@ function serendipity_makePermalink($format, $data, $type = 'entry') {
                 );
             return str_replace($entryKeys, $replacements, $format);
             break;
-            
+
         case 'author':
             $replacements =
                 array(
@@ -522,7 +526,7 @@ function serendipity_makePermalink($format, $data, $type = 'entry') {
                 );
             return str_replace($authorKeys, $replacements, $format);
             break;
-            
+
         case 'category':
             $replacements =
                 array(
index 44fefffc72a91622af17b81bed3cd492e95b5bcb..22d60049334242ff7358b7942b6ff16de5671888 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)\r
 # All rights reserved.  See LICENSE file for licensing details\r
 \r
+if (IN_serendipity !== true) {\r
+    die ("Don't hack!");\r
+}\r
+\r
 /**\r
  * Returns the name of a usergroup.\r
  *\r
@@ -305,7 +309,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
                 $value = $plugin->get_config($config_item, false, true);\r
             }\r
         }\r
-        \r
+\r
         if (isset($_POST['serendipity'][$postkey][$config_item])) {\r
             if (is_array($_POST['serendipity'][$postkey][$config_item])) {\r
                 $hvalue = $_POST['serendipity'][$postkey][$config_item];\r
@@ -343,7 +347,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
                 } else {\r
                     $selected_options = array($hvalue => $hvalue);\r
                 }\r
-                \r
+\r
                 $pre_selected = (array)$cbag->get('select_preselected');\r
                 $select_size  = $cbag->get('select_size');\r
                 $select = $cbag->get('select_values');\r
@@ -494,7 +498,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
             case 'hidden':\r
                 ?><tr><td colspan="2"><input class="direction_<?php echo $lang_direction; ?>" type="hidden" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $cbag->get('value'); ?>" /></td></tr><?php\r
                 break;\r
-            \r
+\r
             default:\r
                 // Unknown configuration key. Let the plugin handle it.\r
                 $addData = func_get_args();\r
@@ -517,8 +521,8 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
 <br />\r
 <?php\r
     }\r
-    \r
-    if ($showSubmit) { \r
+\r
+    if ($showSubmit) {\r
 ?>\r
     <div style="padding-left: 20px">\r
         <input type="submit" name="SAVECONF" value="<?php echo SAVE; ?>" class="serendipityPrettyButton" />\r
@@ -550,6 +554,6 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
 <?php\r
         }\r
     }\r
-    \r
+\r
     return true;\r
 }\r
index af1701018b89a808c05c3cc6167b17942debb71c..09ff58997de61f2167786b661098734b01699441 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Parses entries to display them for RSS/Atom feeds to be passed on to generic Smarty templates
  *
@@ -78,7 +82,7 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
                     $cat['feed_category_name'] = serendipity_utf8_encode(htmlspecialchars($cat['category_name']));
                 }
             }
-            
+
             // Prepare variables
             // 1. UTF8 encoding + htmlspecialchars.
             $entry['feed_title']     = serendipity_utf8_encode(htmlspecialchars($entry['title']));
@@ -101,28 +105,28 @@ function serendipity_printEntries_rss(&$entries, $version, $comments = false, $f
                 case 'opml1.0':
                     $entry_hook = 'frontend_display:opml-1.0:per_entry';
                     break;
-            
+
                 case '0.91':
                     $entry_hook = 'frontend_display:rss-0.91:per_entry';
                     break;
-            
+
                 case '1.0':
                     $entry_hook = 'frontend_display:rss-1.0:per_entry';
                     break;
-            
+
                 case '2.0':
                     $entry_hook = 'frontend_display:rss-2.0:per_entry';
                     break;
-            
+
                 case 'atom0.3':
                     $entry_hook = 'frontend_display:atom-0.3:per_entry';
                     break;
-            
+
                 case 'atom1.0':
                     $entry_hook = 'frontend_display:atom-1.0:per_entry';
                     break;
             }
-            
+
             serendipity_plugin_api::hook_event($entry_hook, $entry);
             $entry['per_entry_display_dat'] = $entry['display_dat'];
         }
index a327f3c11bd5cd9ca1c6539e48740036d27fefbd..be74eb865fe48abfe58aa397eb25bfd8b61dbc6a 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Fetch a list of trackbacks for an entry
  *
index c14081b14ccf663fe91b2ba8a0eae63983df61ee..32150577df7f0800b530a8d2511af2ee537f8efe 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 /**
  * Check a HTTP response if it is a valid XML trackback response
  *
index 6045123fece8b51bfa028f195329ce0d4e502f17..bc8880d804b183ee08a75bd8704a962aa9e0555f 100644 (file)
@@ -84,7 +84,7 @@ function serendipity_fixPlugins($case) {
                 'serendipity_event_searchhighlight',
                 'serendipity_event_textile'
             );
-            
+
             $elements = array(
                 'ENTRY_BODY',
                 'EXTENDED_BODY',
@@ -97,24 +97,24 @@ function serendipity_fixPlugins($case) {
                 $where[] = "name LIKE '$plugin:%'";
             }
 
-            $rows = serendipity_db_query("SELECT name, value, authorid 
-                                            FROM {$serendipity['dbPrefix']}config  
+            $rows = serendipity_db_query("SELECT name, value, authorid
+                                            FROM {$serendipity['dbPrefix']}config
                                            WHERE " . implode(' OR ', $where));
             if (!is_array($rows)) {
                 return false;
             }
-            
+
             foreach($rows AS $row) {
                 if (preg_match('@^(serendipity_event_.+):([a-z0-9]+)/(.+)@i', $row['name'], $plugin_data)) {
                     foreach($elements AS $element) {
                         if ($plugin_data[3] != constant($element)) {
                             continue;
                         }
-                        
+
                         $new = $plugin_data[1] . ':' . $plugin_data[2] . '/' . $element;
                         serendipity_db_query("UPDATE {$serendipity['dbPrefix']}config
                                                  SET name     = '$new'
-                                               WHERE name     = '{$row['name']}' 
+                                               WHERE name     = '{$row['name']}'
                                                  AND value    = '{$row['value']}'
                                                  AND authorid = '{$row['authorid']}'");
                     }
index 9f9a1872a752a346b9f185aea67f67644d90ca53..84a3ac3ab5035b2fb274c338d3605b64650e33be 100644 (file)
@@ -6,6 +6,10 @@ include_once('serendipity_config.inc.php');
 include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
 include_once(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 $uri_addData = array(
     'startpage' => false,
     'uriargs'   => implode('/', serendipity_getUriArguments($uri, true)),
index 68d2b4fd04852601e85820f48f32f51a597c1e67..ab1b1705a6d8335e923db969cd61ae40b320c281 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 if (!defined('serendipity_LANG_LOADED') || serendipity_LANG_LOADED !== true) {
     // Try and include preferred language from the configurated setting
     if (@include(S9Y_INCLUDE_PATH . 'lang/' . $serendipity['charset'] . 'serendipity_lang_'. $serendipity['lang'] .'.inc.php') ) {
index 902a2240c0512fa965fa6a5a01ab055a6d326e6e..c020387410aecc275de9c7dfc45c7b3816d00ab6 100644 (file)
@@ -2,6 +2,10 @@
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
 # All rights reserved.  See LICENSE file for licensing details
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+
 class serendipity_calendar_plugin extends serendipity_plugin {
     var $title = CALENDAR;
 
index d07de6a1412d9dc2cfa580c14b629aa991abc67f..b3658e0203806588155595c2d0ea9f9edfaaf551 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: $\r
+<?php # $Id: $\r
 ##########################################################################\r
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity    #\r
 # Developer Team) All rights reserved.  See LICENSE file for licensing   #\r
index d07de6a1412d9dc2cfa580c14b629aa991abc67f..b3658e0203806588155595c2d0ea9f9edfaaf551 100644 (file)
@@ -1,4 +1,4 @@
-<?php # $Id: $\r
+<?php # $Id: $\r
 ##########################################################################\r
 # Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity    #\r
 # Developer Team) All rights reserved.  See LICENSE file for licensing   #\r
index 091e22cea4abafbe6b65aee7fe9ac1147ae552a6..8d5978f4f2169308844499dabbbacf878ad956ce 100644 (file)
@@ -1,5 +1,9 @@
 <?php # $Id$
 
+if (IN_serendipity !== true) {
+    die ("Don't hack!");
+}
+    
 $probelang = dirname(__FILE__) . '/lang_' . $serendipity['lang'] . '.inc.php';
 if (file_exists($probelang)) {
     include $probelang;