/** * Can only be fetched once. The XMPP Session is not valid anymore on refresh. User will have to relogin manually. * @return array */ public static function getPrebindInfo() { require GO::config()->root_path . 'modules/chat/xmpp-prebind-php/lib/XmppPrebind.php'; GO::debug("CHAT: Pre binding to XMPP HOST: " . self::getXmppHost() . " BOSH URI: " . self::getBoshUri() . " with user " . GO::user()->username); if (isset(GO::session()->values['chat']['p'])) { try { $xmppPrebind = new \XmppPrebind(self::getXmppHost(), self::getBoshUri(), GO::config()->product_name, strpos(self::getBoshUri(), 'https') !== false, false); if ($xmppPrebind->connect(GO::user()->username, \GO\Base\Util\Crypt::decrypt(GO::session()->values['chat']['p']))) { $xmppPrebind->auth(); GO::debug("CHAT: connect successfull"); // array containing sid, rid and jid $ret = $xmppPrebind->getSessionInfo(); $ret['prebind'] = "true"; return $ret; } else { GO::debug("CHAT: failed to connect"); } } catch (\Exception $e) { GO::debug("CHAT: Authentication failed: " . $e); } } else { GO::debug("CHAT: Password not set"); } $ret = array('prebind' => 'false', 'jid' => '', 'sid' => '', 'rid' => ''); return $ret; }
public function formatDisplay($key, &$attributes, \GO\Customfields\Model\AbstractCustomFieldsRecord $model) { if (\GO\Customfields\Model\AbstractCustomFieldsRecord::$formatForExport) { return \GO\Base\Util\Crypt::decrypt($attributes[$key]); } $decrypted = !empty($attributes[$key]) ? '<div ext:qtip="' . htmlspecialchars(\GO\Base\Util\Crypt::decrypt($attributes[$key]), ENT_COMPAT, 'utf-8') . '">' . \GO::t('pointForText') . '</div>' : ''; return $decrypted; }
protected function actionIndex($params) { //$funcParams = \GO\Base\Util\Crypt::decrypt($params['f']); if (substr($_REQUEST['f'], 0, 9) == '{GOCRYPT}') { $funcParams = \GO\Base\Util\Crypt::decrypt($_REQUEST['f']); } else { $funcParams = json_decode(base64_decode($_REQUEST['f']), true); } $this->render('external', $funcParams); }
public function decryptSmtpPassword() { if (!empty(\GO::session()->values['emailModule']['smtpPasswords'][$this->id])) { $decrypted = \GO\Base\Util\Crypt::decrypt(\GO::session()->values['emailModule']['smtpPasswords'][$this->id]); } else { //support for z-push without storing passwords if (empty($this->smtp_password) && method_exists('Request', 'GetAuthPassword') && Request::GetAuthUser() == $this->smtp_username) { $decrypted = Request::GetAuthPassword(); } else { $decrypted = \GO\Base\Util\Crypt::decrypt($this->smtp_password); } } return $decrypted ? $decrypted : $this->smtp_password; }
public function decrypt($password) { if ($this->password != crypt($password, $this->password)) { return false; } else { $this->_decrypted = true; $this->content = Crypt::decrypt($this->content, $password); return true; } }
GO::router()->getController()->fireEvent('inlinescripts'); ?> </script> <?php if (file_exists(\GO::view()->getTheme()->getPath() . 'MainLayout.js')) { echo '<script src="' . \GO::view()->getTheme()->getUrl() . 'MainLayout.js" type="text/javascript"></script>'; echo "\n"; } ?> <script type="text/javascript"> <?php //these parameter are passed by dialog.php. These are used to directly link to //a dialog. if (isset($_REQUEST['f'])) { if (substr($_REQUEST['f'], 0, 9) == '{GOCRYPT}') { $fp = \GO\Base\Util\Crypt::decrypt($_REQUEST['f']); } else { $fp = json_decode(base64_decode($_REQUEST['f']), true); } \GO::debug("External function parameters:"); \GO::debug($fp); ?> if(GO.<?php echo $fp['m']; ?> ) { GO.mainLayout.on("render", function(){ GO.<?php echo $fp['m']; ?>