Skip to content

Commit

Permalink
Release 0.14
Browse files Browse the repository at this point in the history
update to kitFramework with date of 27.11.2013
added the CommandCollection kitCommand ~~ ral ~~ for RAL tables
  • Loading branch information
hertsch committed Nov 27, 2013
1 parent 1984089 commit ead9d01
Show file tree
Hide file tree
Showing 166 changed files with 5,942 additions and 265 deletions.
2 changes: 1 addition & 1 deletion apache2/logs/httpd.pid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
864
13468
48 changes: 48 additions & 0 deletions mysql/data/RECT-Ralf.err
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,51 @@ Version: '5.6.13' socket: '' port: 3307 MySQL Community Server (GPL)
2013-11-08 11:43:16 7724 [Note] Event Scheduler: Loaded 0 events
2013-11-08 11:43:16 7724 [Note] D:\Repositories\CMS\localWBkitFramework/mysql/bin/mysqld_usbwv8.exe: ready for connections.
Version: '5.6.13' socket: '' port: 3307 MySQL Community Server (GPL)
2013-11-09 05:32:04 12504 [Note] Plugin 'FEDERATED' is disabled.
2013-11-09 05:32:04 12504 [Note] InnoDB: The InnoDB memory heap is disabled
2013-11-09 05:32:04 12504 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-11-09 05:32:04 12504 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-11-09 05:32:04 12504 [Note] InnoDB: Not using CPU crc32 instructions
2013-11-09 05:32:04 12504 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-11-09 05:32:04 12504 [Note] InnoDB: Completed initialization of buffer pool
2013-11-09 05:32:04 12504 [Note] InnoDB: Highest supported file format is Barracuda.
2013-11-09 05:32:04 12504 [Note] InnoDB: The log sequence numbers 1626134 and 1626134 in ibdata files do not match the log sequence number 3371311 in the ib_logfiles!
2013-11-09 05:32:04 12504 [Note] InnoDB: Database was not shutdown normally!
2013-11-09 05:32:04 12504 [Note] InnoDB: Starting crash recovery.
2013-11-09 05:32:04 12504 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-11-09 05:32:05 12504 [Note] InnoDB: Restoring possible half-written data pages
2013-11-09 05:32:05 12504 [Note] InnoDB: from the doublewrite buffer...
2013-11-09 05:32:06 12504 [Note] InnoDB: 128 rollback segment(s) are active.
2013-11-09 05:32:06 12504 [Note] InnoDB: Waiting for purge to start
2013-11-09 05:32:06 12504 [Note] InnoDB: 5.6.13 started; log sequence number 3371311
2013-11-09 05:32:06 12504 [Note] Server hostname (bind-address): '*'; port: 3307
2013-11-09 05:32:06 12504 [Note] IPv6 is available.
2013-11-09 05:32:06 12504 [Note] - '::' resolves to '::';
2013-11-09 05:32:06 12504 [Note] Server socket created on IP: '::'.
2013-11-09 05:32:07 12504 [Note] Event Scheduler: Loaded 0 events
2013-11-09 05:32:07 12504 [Note] D:\Repositories\CMS\localWBkitFramework/mysql/bin/mysqld_usbwv8.exe: ready for connections.
Version: '5.6.13' socket: '' port: 3307 MySQL Community Server (GPL)
2013-11-27 16:56:22 14932 [Note] Plugin 'FEDERATED' is disabled.
2013-11-27 16:56:22 14932 [Note] InnoDB: The InnoDB memory heap is disabled
2013-11-27 16:56:22 14932 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2013-11-27 16:56:22 14932 [Note] InnoDB: Compressed tables use zlib 1.2.3
2013-11-27 16:56:22 14932 [Note] InnoDB: Not using CPU crc32 instructions
2013-11-27 16:56:22 14932 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2013-11-27 16:56:22 14932 [Note] InnoDB: Completed initialization of buffer pool
2013-11-27 16:56:22 14932 [Note] InnoDB: Highest supported file format is Barracuda.
2013-11-27 16:56:22 14932 [Note] InnoDB: The log sequence numbers 1626134 and 1626134 in ibdata files do not match the log sequence number 3443215 in the ib_logfiles!
2013-11-27 16:56:22 14932 [Note] InnoDB: Database was not shutdown normally!
2013-11-27 16:56:22 14932 [Note] InnoDB: Starting crash recovery.
2013-11-27 16:56:22 14932 [Note] InnoDB: Reading tablespace information from the .ibd files...
2013-11-27 16:56:23 14932 [Note] InnoDB: Restoring possible half-written data pages
2013-11-27 16:56:23 14932 [Note] InnoDB: from the doublewrite buffer...
2013-11-27 16:56:24 14932 [Note] InnoDB: 128 rollback segment(s) are active.
2013-11-27 16:56:24 14932 [Note] InnoDB: Waiting for purge to start
2013-11-27 16:56:24 14932 [Note] InnoDB: 5.6.13 started; log sequence number 3443215
2013-11-27 16:56:24 14932 [Note] Server hostname (bind-address): '*'; port: 3307
2013-11-27 16:56:24 14932 [Note] IPv6 is available.
2013-11-27 16:56:24 14932 [Note] - '::' resolves to '::';
2013-11-27 16:56:24 14932 [Note] Server socket created on IP: '::'.
2013-11-27 16:56:25 14932 [Note] Event Scheduler: Loaded 0 events
2013-11-27 16:56:25 14932 [Note] D:\Repositories\CMS\localWBkitFramework/mysql/bin/mysqld_usbwv8.exe: ready for connections.
Version: '5.6.13' socket: '' port: 3307 MySQL Community Server (GPL)
2 changes: 1 addition & 1 deletion mysql/data/RECT-Ralf.pid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7724
14932
Binary file modified mysql/data/ib_logfile0
Binary file not shown.
Binary file modified mysql/data/ibdata1
Binary file not shown.
Binary file modified mysql/data/mysql/innodb_index_stats.ibd
Binary file not shown.
Binary file modified mysql/data/mysql/innodb_table_stats.ibd
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_addons.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_addons.MYI
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_kit2_basic_command_parameter.ibd
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_kit2_basic_extension_catalog.ibd
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_kit2_basic_extension_register.ibd
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_kit2_basic_setting.ibd
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_kit2_basic_users.ibd
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_mod_code.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_mod_code.MYI
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_mod_wysiwyg.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_mod_wysiwyg.MYI
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_pages.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_pages.MYI
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_sections.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_sections.MYI
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_users.MYD
Binary file not shown.
Binary file modified mysql/data/wb_283/wb_users.MYI
Binary file not shown.
25 changes: 25 additions & 0 deletions root/kit2/extension/phpmanufaktur/phpManufaktur/Basic/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,31 @@ MIT License (MIT) - <http://www.opensource.org/licenses/MIT>

kitFramework - <https://kit2.phpmanufaktur.de>

**0.61**

* introduce class `dbUtils` and share it as `$app[db.utils]`
* added missing check to `bootstrap.php` for MySQL InnoDB

**0.60**

* set the `CMS_PATH` from `FRAMEWORK_PATH` to avoid invalid assignments at mobile installations
* introduce `/pattern` templates and add a pattern for the about dialog
* BASIC get the parameter ID (PID) now also from submitted `form.factory` forms
* changed visibility for $message to protected to enable extended classes to set messages direct without auto-formatting
* switch off the debugging mode if the application return a 403 HTTP error
* added new kitCommand parameter `cache[]`
* add `createGUID()` and `getUserByGUID()` to class `Account`
* improved the `CustomLogoutSuccessHandler` and assigned actions/forms
* added missing `guid_status` at `createNewGUID()` to class `Users`
* fixed a incomplete check for the license key at setup of Admin-Tools

**0.59** - 2013-11-09

* changed license information and handling in `extension.json`
* removed link to german help file for the kitCommands because it is incomplete, use the english help instead
* added `getProxyInfo()` in class `Utils` - return array with PROXY information
* fixed: `_recaptcha_http_post()` support now also the usage of a PROXY server

**0.58** - 2013-11-08

* set FRAMEWORK_PATH from BOOTSTRAP_PATH and get it no longer from the framework.json (needed for mobile Installations)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use phpManufaktur\Basic\Data\Security\Users as FrameworkUser;
use phpManufaktur\Basic\Data\CMS\Users as CMSuser;
use phpManufaktur\Basic\Data\Security\Users;

class Account
{
Expand Down Expand Up @@ -138,8 +137,7 @@ public function loginUserToSecureArea($username, $roles, $secure_area_name='gene
$data = array(
'last_login' => date('Y-m-d H:i:s')
);
$Users = new Users($this->app);
$Users->updateUser($username, $data);
$this->FrameworkUser->updateUser($username, $data);
}

/**
Expand Down Expand Up @@ -219,4 +217,32 @@ public function checkLogin($username, $password, &$roles=array())
return $this->FrameworkUser->checkLogin($username, $password, $roles);
}

/**
* Create a new GUID for the user and return it
*
* @param string $username
* @param boolean $guid_check ignore the GUID check
* @return boolean|string FALSE if GUID was last changed within 24 hours
*/
public function createGUID($username, $guid_check=true)
{
if (false === ($data = $this->FrameworkUser->createNewGUID($username, $guid_check))) {
return false;
}
else {
return $data['guid'];
}
}

/**
* Get the user data by the given GUID
*
* @param string $guid
* @return boolean|array FALSE if not exists, array with user data on success
*/
public function getUserByGUID($guid)
{
return $this->FrameworkUser->selectUserByGUID($guid);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ public function onLogoutSuccess(Request $request)
{
// get all parameters
$parameters = $request->query->all();
// set the target
$target = (!isset($parameters['redirect']) && !empty($parameters['redirect'])) ? $parameters['redirect'] : $this->targetUrl;
unset($parameters['redirect']);
// build the parameter string
$parameter_str = !empty($parameters) ? '?'.http_build_query($parameters) : '';
// return the logout response
return $this->httpUtils->createRedirectResponse($request, $target.$parameter_str);
return $this->httpUtils->createRedirectResponse($request, $this->targetUrl.$parameter_str);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function exec($extension_path, $extension_route)
if (!isset($extension['vendor']['name'])) {
throw new \Exception('Missing the vendor name of the extension!');
}
if (!isset($extension['license'])) {
if (!isset($extension['license']['name'])) {
throw new \Exception('Missing the license type for the extension!');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ public function controllerGoodBye(Application $app)
{
$this->initParameters($app);

if (!is_null($content = $app['request']->query->get('content'))) {
$content = urldecode($content);
if (null !== ($redirect = $app['request']->query->get('redirect'))) {
// redirect to the given route or URL
$parameters = $app['request']->query->all();
unset($parameters['redirect']);
$parameter_str = !empty($parameters) ? '?'.http_build_query($parameters) : '';
return $app->redirect(FRAMEWORK_URL.$redirect.$parameter_str);
}

return $app['twig']->render($app['utils']->getTemplateFile(
'@phpManufaktur/Basic/Template',
'framework/goodbye.twig'), array(
'basic' => $this->getBasicSettings(),
'content' => $content
'message' => $app['request']->query->get('message')
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ function _recaptcha_qsencode ($data) {
* @param int port
* @return array response
*/
function _recaptcha_http_post($host, $path, $data, $port = 80) {
function _recaptcha_http_post($host, $path, $data, $port = 80)
{
global $app;

// get the PROXY information
$proxy = $app['utils']->getProxyInfo();
if (($proxy['proxy_auth'] != 'NONE') && !is_null($proxy['proxy_port'])) {
// use the PROXY port instead
$port = $proxy['proxy_port'];
}

$req = _recaptcha_qsencode ($data);

Expand Down Expand Up @@ -105,11 +114,11 @@ function _recaptcha_http_post($host, $path, $data, $port = 80) {
*/
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
if ($pubkey == null || $pubkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($use_ssl) {
if ($pubkey == null || $pubkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}

if ($use_ssl) {
$server = RECAPTCHA_API_SECURE_SERVER;
} else {
$server = RECAPTCHA_API_SERVER;
Expand All @@ -121,11 +130,11 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
}
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>';
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>';
}


Expand All @@ -151,16 +160,16 @@ class ReCaptchaResponse {
*/
function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array())
{
if ($privkey == null || $privkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($privkey == null || $privkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}

if ($remoteip == null || $remoteip == '') {
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
}


if ($remoteip == null || $remoteip == '') {
die ("For security reasons, you must pass the remote ip to reCAPTCHA");
}



//discard spam submissions
if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) {
$recaptcha_response = new ReCaptchaResponse();
Expand Down Expand Up @@ -200,44 +209,44 @@ function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $ex
* @param string $appname The name of your application
*/
function recaptcha_get_signup_url ($domain = null, $appname = null) {
return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname));
}

function _recaptcha_aes_pad($val) {
$block_size = 16;
$numpad = $block_size - (strlen ($val) % $block_size);
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
$block_size = 16;
$numpad = $block_size - (strlen ($val) % $block_size);
return str_pad($val, strlen ($val) + $numpad, chr($numpad));
}

/* Mailhide related code */

function _recaptcha_aes_encrypt($val,$ky) {
if (! function_exists ("mcrypt_encrypt")) {
die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
}
$mode=MCRYPT_MODE_CBC;
$enc=MCRYPT_RIJNDAEL_128;
$val=_recaptcha_aes_pad($val);
return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
if (! function_exists ("mcrypt_encrypt")) {
die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed.");
}
$mode=MCRYPT_MODE_CBC;
$enc=MCRYPT_RIJNDAEL_128;
$val=_recaptcha_aes_pad($val);
return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0");
}


function _recaptcha_mailhide_urlbase64 ($x) {
return strtr(base64_encode ($x), '+/', '-_');
return strtr(base64_encode ($x), '+/', '-_');
}

/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */
function recaptcha_mailhide_url($pubkey, $privkey, $email) {
if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
"you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
}

$ky = pack('H*', $privkey);
$cryptmail = _recaptcha_aes_encrypt ($email, $ky);
return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " .
"you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
}


$ky = pack('H*', $privkey);
$cryptmail = _recaptcha_aes_encrypt ($email, $ky);

return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail);
}

/**
Expand All @@ -246,16 +255,16 @@ function recaptcha_mailhide_url($pubkey, $privkey, $email) {
* the email is then displayed as john...@example.com
*/
function _recaptcha_mailhide_email_parts ($email) {
$arr = preg_split("/@/", $email );

if (strlen ($arr[0]) <= 4) {
$arr[0] = substr ($arr[0], 0, 1);
} else if (strlen ($arr[0]) <= 6) {
$arr[0] = substr ($arr[0], 0, 3);
} else {
$arr[0] = substr ($arr[0], 0, 4);
}
return $arr;
$arr = preg_split("/@/", $email );

if (strlen ($arr[0]) <= 4) {
$arr[0] = substr ($arr[0], 0, 1);
} else if (strlen ($arr[0]) <= 6) {
$arr[0] = substr ($arr[0], 0, 3);
} else {
$arr[0] = substr ($arr[0], 0, 4);
}
return $arr;
}

/**
Expand All @@ -265,11 +274,11 @@ function _recaptcha_mailhide_email_parts ($email) {
* http://www.google.com/recaptcha/mailhide/apikey
*/
function recaptcha_mailhide_html($pubkey, $privkey, $email) {
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);
return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);

return htmlentities($emailparts[0]) . "<a href='" . htmlentities ($url) .
"' onclick=\"window.open('" . htmlentities ($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function loadUserByUsername ($username)
// user not found - check if the user exists as CMS user!
$cmsUser = new Data\CMS\Users($this->app);
$isAdmin = false;
if (false === ($user = $cmsUser->selectUser($username . $isAdmin))) {
if (false === ($user = $cmsUser->selectUser($username, $isAdmin))) {
// give up - user not found
throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));
}
Expand Down
Loading

0 comments on commit ead9d01

Please sign in to comment.