From 057ae7c5183e52efe4d5a972d878693613295b14 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sat, 26 Sep 2015 23:06:54 +0200 Subject: [PATCH] use proper PHP opening tag and protect files against extension attacks --- phpbase/autoload.php | 2 ++ phpbase/db.php | 6 ++++-- phpbase/db_mysql.php | 6 ++++-- phpbase/db_pgsql.php | 6 ++++-- phpbase/exception.php | 6 ++++-- phpbase/object.php | 2 ++ phpbase/schema.php | 7 +++++-- phpbase/table.php | 6 ++++-- phpbase/tr.php | 6 ++++-- phpbase/transaction.php | 6 ++++-- woc/php/phpconst.h | 6 +++--- 11 files changed, 40 insertions(+), 19 deletions(-) diff --git a/phpbase/autoload.php b/phpbase/autoload.php index 01cd4e3..b5a2098 100644 --- a/phpbase/autoload.php +++ b/phpbase/autoload.php @@ -43,4 +43,6 @@ function wob_autoload($cname) } spl_autoload_register('wob_autoload'); +//EOF +return ?> diff --git a/phpbase/db.php b/phpbase/db.php index 3587a8c..e54c0aa 100644 --- a/phpbase/db.php +++ b/phpbase/db.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -641,4 +641,6 @@ abstract class DbEngine } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/db_mysql.php b/phpbase/db_mysql.php index a182b4e..f9b4518 100644 --- a/phpbase/db_mysql.php +++ b/phpbase/db_mysql.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -302,4 +302,6 @@ class MysqlEngine extends DbEngine } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/db_pgsql.php b/phpbase/db_pgsql.php index f0fb078..9d9b44e 100644 --- a/phpbase/db_pgsql.php +++ b/phpbase/db_pgsql.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -373,4 +373,6 @@ class PGsqlEngine extends DbEngine } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/exception.php b/phpbase/exception.php index 36653ba..8bea190 100644 --- a/phpbase/exception.php +++ b/phpbase/exception.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -88,4 +88,6 @@ class WobSoapTransactionError extends TransactionError } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/object.php b/phpbase/object.php index d29f4c4..53d99fb 100644 --- a/phpbase/object.php +++ b/phpbase/object.php @@ -54,4 +54,6 @@ class WObject { } }; +//EOF +return ?> diff --git a/phpbase/schema.php b/phpbase/schema.php index 21ee8d2..01065cb 100644 --- a/phpbase/schema.php +++ b/phpbase/schema.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -172,4 +172,7 @@ class WobSchemaBase { return $r; } }; -?> \ No newline at end of file + +//EOF +return +?> diff --git a/phpbase/table.php b/phpbase/table.php index 1d424f5..4671a63 100644 --- a/phpbase/table.php +++ b/phpbase/table.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -245,4 +245,6 @@ abstract class WobTable } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/tr.php b/phpbase/tr.php index b970d3b..7d2b97f 100644 --- a/phpbase/tr.php +++ b/phpbase/tr.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -15,4 +15,6 @@ function translate($context,$str,$comment=""){return $str;} /**XML translation: & -> &, < -> < etc.pp.*/ function xq($str){return htmlspecialchars($str,ENT_NOQUOTES,"UTF-8");} -?> \ No newline at end of file +//EOF +return +?> diff --git a/phpbase/transaction.php b/phpbase/transaction.php index 3ee5001..e28fe6f 100644 --- a/phpbase/transaction.php +++ b/phpbase/transaction.php @@ -1,4 +1,4 @@ - // protected under the GNU LGPL version 3 or at your option any newer. // See COPYING.LGPL file that comes with this distribution. @@ -257,4 +257,6 @@ class WobTransactionBase { } }; -?> \ No newline at end of file +//EOF +return +?> diff --git a/woc/php/phpconst.h b/woc/php/phpconst.h index 281bc04..0ffbf54 100644 --- a/woc/php/phpconst.h +++ b/woc/php/phpconst.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2011 by Konrad Rosenbaum +// Copyright (C) 2009-2014 by Konrad Rosenbaum // protected under the GNU GPL version 3 or at your option any newer. // See COPYING.GPL file that comes with this distribution. // @@ -6,8 +6,8 @@ #ifndef WOC_PHP_CONST_H #define WOC_PHP_CONST_H -static const QByteArray PHPSTART(""); +static const QByteArray PHPSTART(""); #ifndef WOC_PHP_NO_WRAP #define m_basedir m_parent->m_basedir -- 1.7.2.5