@@ -163,12 +163,12 @@ |
||
| 163 | 163 | $this->_path = $path; |
| 164 | 164 | // check the format and store it |
| 165 | 165 | switch ($format) {
|
| 166 | - case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN: |
|
| 167 | - case CAS_PGT_STORAGE_FILE_FORMAT_XML: |
|
| 168 | - $this->_format = $format; |
|
| 169 | - break; |
|
| 170 | - default: |
|
| 171 | - phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
|
|
| 166 | + case CAS_PGT_STORAGE_FILE_FORMAT_PLAIN: |
|
| 167 | + case CAS_PGT_STORAGE_FILE_FORMAT_XML: |
|
| 168 | + $this->_format = $format; |
|
| 169 | + break; |
|
| 170 | + default: |
|
| 171 | + phpCAS::error('unknown PGT file storage format (`'.CAS_PGT_STORAGE_FILE_FORMAT_PLAIN.'\' and `'.CAS_PGT_STORAGE_FILE_FORMAT_XML.'\' allowed)');
|
|
| 172 | 172 | } |
| 173 | 173 | phpCAS::traceEnd(); |
| 174 | 174 | } |
@@ -26,14 +26,14 @@ |
||
| 26 | 26 | * Redirect to the correct script to handle this type of upload |
| 27 | 27 | */ |
| 28 | 28 | switch ($_SESSION['my_tool']) { |
| 29 | - case TOOL_LEARNPATH: |
|
| 30 | - require 'upload.scorm.php'; |
|
| 31 | - break; |
|
| 32 | - //the following cases need to be distinguished later on |
|
| 33 | - case TOOL_DROPBOX: |
|
| 34 | - case TOOL_STUDENTPUBLICATION: |
|
| 35 | - case TOOL_DOCUMENT: |
|
| 36 | - default: |
|
| 37 | - require 'upload.document.php'; |
|
| 38 | - break; |
|
| 29 | + case TOOL_LEARNPATH: |
|
| 30 | + require 'upload.scorm.php'; |
|
| 31 | + break; |
|
| 32 | + //the following cases need to be distinguished later on |
|
| 33 | + case TOOL_DROPBOX: |
|
| 34 | + case TOOL_STUDENTPUBLICATION: |
|
| 35 | + case TOOL_DOCUMENT: |
|
| 36 | + default: |
|
| 37 | + require 'upload.document.php'; |
|
| 38 | + break; |
|
| 39 | 39 | } |
@@ -15,52 +15,52 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | switch ($_REQUEST['action']) { |
| 18 | - case "get": |
|
| 19 | - print storage_get($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 20 | - break; |
|
| 21 | - case "set": |
|
| 22 | - if (storage_can_set($_REQUEST['svuser'])) { |
|
| 23 | - print storage_set($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svvalue']); |
|
| 24 | - } |
|
| 25 | - break; |
|
| 26 | - case "getall": |
|
| 27 | - print storage_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco']); |
|
| 28 | - break; |
|
| 29 | - case "stackpush": |
|
| 30 | - if (storage_can_set($_REQUEST['svuser'])) { |
|
| 31 | - print storage_stack_push($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svvalue']); |
|
| 32 | - } |
|
| 33 | - break; |
|
| 34 | - case "stackpop": |
|
| 35 | - if (storage_can_set($_REQUEST['svuser'])) { |
|
| 36 | - print storage_stack_pop($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 37 | - } |
|
| 38 | - break; |
|
| 39 | - case "stacklength": |
|
| 40 | - print storage_stack_length($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 41 | - break; |
|
| 42 | - case "stackclear": |
|
| 43 | - if (storage_can_set($_REQUEST['svuser'])) { |
|
| 44 | - print storage_stack_clear($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 45 | - } |
|
| 46 | - break; |
|
| 47 | - case "stackgetall": |
|
| 48 | - if (storage_can_set($_REQUEST['svuser'])) |
|
| 49 | - print storage_stack_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 50 | - break; |
|
| 51 | - case "getposition": |
|
| 52 | - print storage_get_position($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svasc']); |
|
| 53 | - break; |
|
| 54 | - case "getleaders": |
|
| 55 | - print storage_get_leaders($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svasc'], $_REQUEST['svlength']); |
|
| 56 | - break; |
|
| 57 | - case "usersgetall": |
|
| 58 | -// security issue |
|
| 59 | - print "NOT allowed, security issue, see sources"; |
|
| 60 | -// print storage_get_all_users(); |
|
| 61 | - break; |
|
| 62 | - default: |
|
| 63 | - // Do nothing |
|
| 18 | + case "get": |
|
| 19 | + print storage_get($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 20 | + break; |
|
| 21 | + case "set": |
|
| 22 | + if (storage_can_set($_REQUEST['svuser'])) { |
|
| 23 | + print storage_set($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svvalue']); |
|
| 24 | + } |
|
| 25 | + break; |
|
| 26 | + case "getall": |
|
| 27 | + print storage_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco']); |
|
| 28 | + break; |
|
| 29 | + case "stackpush": |
|
| 30 | + if (storage_can_set($_REQUEST['svuser'])) { |
|
| 31 | + print storage_stack_push($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svvalue']); |
|
| 32 | + } |
|
| 33 | + break; |
|
| 34 | + case "stackpop": |
|
| 35 | + if (storage_can_set($_REQUEST['svuser'])) { |
|
| 36 | + print storage_stack_pop($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 37 | + } |
|
| 38 | + break; |
|
| 39 | + case "stacklength": |
|
| 40 | + print storage_stack_length($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 41 | + break; |
|
| 42 | + case "stackclear": |
|
| 43 | + if (storage_can_set($_REQUEST['svuser'])) { |
|
| 44 | + print storage_stack_clear($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 45 | + } |
|
| 46 | + break; |
|
| 47 | + case "stackgetall": |
|
| 48 | + if (storage_can_set($_REQUEST['svuser'])) |
|
| 49 | + print storage_stack_getall($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey']); |
|
| 50 | + break; |
|
| 51 | + case "getposition": |
|
| 52 | + print storage_get_position($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svasc']); |
|
| 53 | + break; |
|
| 54 | + case "getleaders": |
|
| 55 | + print storage_get_leaders($_REQUEST['svuser'], $_REQUEST['svcourse'], $_REQUEST['svsco'], $_REQUEST['svkey'], $_REQUEST['svasc'], $_REQUEST['svlength']); |
|
| 56 | + break; |
|
| 57 | + case "usersgetall": |
|
| 58 | + // security issue |
|
| 59 | + print "NOT allowed, security issue, see sources"; |
|
| 60 | + // print storage_get_all_users(); |
|
| 61 | + break; |
|
| 62 | + default: |
|
| 63 | + // Do nothing |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | function storage_can_set($sv_user) { |
@@ -55,56 +55,56 @@ |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | switch ($action) { |
| 58 | - case 'chatheartbeat': |
|
| 59 | - $chat->heartbeat(); |
|
| 60 | - break; |
|
| 61 | - case 'closechat': |
|
| 62 | - $chat->close(); |
|
| 63 | - break; |
|
| 64 | - case 'sendchat': |
|
| 65 | - $chat->send(api_get_user_id(), $to_user_id, $message); |
|
| 66 | - break; |
|
| 67 | - case 'startchatsession': |
|
| 68 | - $chat->startSession(); |
|
| 69 | - break; |
|
| 70 | - case 'set_status': |
|
| 71 | - $status = isset($_REQUEST['status']) ? intval($_REQUEST['status']) : 0; |
|
| 72 | - $chat->setUserStatus($status); |
|
| 73 | - break; |
|
| 74 | - case 'create_room': |
|
| 75 | - $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
| 76 | - |
|
| 77 | - if ($room === false) { |
|
| 78 | - $createdRoom = VideoChat::createRoom(api_get_user_id(), $to_user_id); |
|
| 79 | - |
|
| 80 | - if ($createdRoom === false) { |
|
| 81 | - echo Display::return_message(get_lang('ChatRoomNotCreated'), 'error'); |
|
| 82 | - break; |
|
| 58 | + case 'chatheartbeat': |
|
| 59 | + $chat->heartbeat(); |
|
| 60 | + break; |
|
| 61 | + case 'closechat': |
|
| 62 | + $chat->close(); |
|
| 63 | + break; |
|
| 64 | + case 'sendchat': |
|
| 65 | + $chat->send(api_get_user_id(), $to_user_id, $message); |
|
| 66 | + break; |
|
| 67 | + case 'startchatsession': |
|
| 68 | + $chat->startSession(); |
|
| 69 | + break; |
|
| 70 | + case 'set_status': |
|
| 71 | + $status = isset($_REQUEST['status']) ? intval($_REQUEST['status']) : 0; |
|
| 72 | + $chat->setUserStatus($status); |
|
| 73 | + break; |
|
| 74 | + case 'create_room': |
|
| 75 | + $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
| 76 | + |
|
| 77 | + if ($room === false) { |
|
| 78 | + $createdRoom = VideoChat::createRoom(api_get_user_id(), $to_user_id); |
|
| 79 | + |
|
| 80 | + if ($createdRoom === false) { |
|
| 81 | + echo Display::return_message(get_lang('ChatRoomNotCreated'), 'error'); |
|
| 82 | + break; |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
| 83 | 86 | } |
| 84 | 87 | |
| 85 | - $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
| 86 | - } |
|
| 87 | - |
|
| 88 | - $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH) . "chat/video.php?room={$room['id']}"; |
|
| 89 | - $videoChatLink = Display::url( |
|
| 90 | - Display::returnFontAwesomeIcon('video-camera') . get_lang('StartVideoChat'), |
|
| 91 | - $videoChatUrl |
|
| 92 | - ); |
|
| 93 | - |
|
| 94 | - $chat->send( |
|
| 95 | - api_get_user_id(), |
|
| 96 | - $to_user_id, |
|
| 97 | - $videoChatLink, |
|
| 98 | - false, |
|
| 99 | - false |
|
| 100 | - ); |
|
| 101 | - |
|
| 102 | - echo Display::tag('p', $videoChatLink, ['class' => 'lead']); |
|
| 103 | - break; |
|
| 104 | - case 'notify_not_support': |
|
| 105 | - $chat->send(api_get_user_id(), $to_user_id, get_lang('TheXUserBrowserDoesNotSupportWebRTC')); |
|
| 106 | - break; |
|
| 107 | - default: |
|
| 108 | - echo ''; |
|
| 88 | + $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH) . "chat/video.php?room={$room['id']}"; |
|
| 89 | + $videoChatLink = Display::url( |
|
| 90 | + Display::returnFontAwesomeIcon('video-camera') . get_lang('StartVideoChat'), |
|
| 91 | + $videoChatUrl |
|
| 92 | + ); |
|
| 93 | + |
|
| 94 | + $chat->send( |
|
| 95 | + api_get_user_id(), |
|
| 96 | + $to_user_id, |
|
| 97 | + $videoChatLink, |
|
| 98 | + false, |
|
| 99 | + false |
|
| 100 | + ); |
|
| 101 | + |
|
| 102 | + echo Display::tag('p', $videoChatLink, ['class' => 'lead']); |
|
| 103 | + break; |
|
| 104 | + case 'notify_not_support': |
|
| 105 | + $chat->send(api_get_user_id(), $to_user_id, get_lang('TheXUserBrowserDoesNotSupportWebRTC')); |
|
| 106 | + break; |
|
| 107 | + default: |
|
| 108 | + echo ''; |
|
| 109 | 109 | } |
| 110 | 110 | exit; |
@@ -300,21 +300,21 @@ |
||
| 300 | 300 | $name = str_replace("\x00", "", $nameUtf16); |
| 301 | 301 | $type = $this->_readInt1($fh); |
| 302 | 302 | switch ($type) { |
| 303 | - case OLE_PPS_TYPE_ROOT: |
|
| 304 | - require_once 'OLE/PPS/Root.php'; |
|
| 305 | - $pps = new OLE_PPS_Root(null, null, array()); |
|
| 306 | - $this->root = $pps; |
|
| 307 | - break; |
|
| 308 | - case OLE_PPS_TYPE_DIR: |
|
| 309 | - $pps = new OLE_PPS(null, null, null, null, null, |
|
| 310 | - null, null, null, null, array()); |
|
| 311 | - break; |
|
| 312 | - case OLE_PPS_TYPE_FILE: |
|
| 313 | - require_once 'OLE/PPS/File.php'; |
|
| 314 | - $pps = new OLE_PPS_File($name); |
|
| 315 | - break; |
|
| 316 | - default: |
|
| 317 | - continue; |
|
| 303 | + case OLE_PPS_TYPE_ROOT: |
|
| 304 | + require_once 'OLE/PPS/Root.php'; |
|
| 305 | + $pps = new OLE_PPS_Root(null, null, array()); |
|
| 306 | + $this->root = $pps; |
|
| 307 | + break; |
|
| 308 | + case OLE_PPS_TYPE_DIR: |
|
| 309 | + $pps = new OLE_PPS(null, null, null, null, null, |
|
| 310 | + null, null, null, null, array()); |
|
| 311 | + break; |
|
| 312 | + case OLE_PPS_TYPE_FILE: |
|
| 313 | + require_once 'OLE/PPS/File.php'; |
|
| 314 | + $pps = new OLE_PPS_File($name); |
|
| 315 | + break; |
|
| 316 | + default: |
|
| 317 | + continue; |
|
| 318 | 318 | } |
| 319 | 319 | fseek($fh, 1, SEEK_CUR); |
| 320 | 320 | $pps->Type = $type; |
@@ -167,17 +167,17 @@ |
||
| 167 | 167 | $outputString = $figlet->lineEcho($this->getPhrase()); |
| 168 | 168 | |
| 169 | 169 | switch ($this->_output) { |
| 170 | - case 'text': |
|
| 171 | - $this->setCaptcha($outputString); |
|
| 172 | - break; |
|
| 173 | - case 'html': |
|
| 174 | - $this->setCaptcha($this->_getCAPTCHAAsHTML($outputString)); |
|
| 175 | - break; |
|
| 176 | - case 'javascript': |
|
| 177 | - $this->setCaptcha($this->_getCAPTCHAAsJavascript($outputString)); |
|
| 178 | - break; |
|
| 179 | - default: |
|
| 180 | - throw new Text_CAPTCHA_Exception('Invalid output option given'); |
|
| 170 | + case 'text': |
|
| 171 | + $this->setCaptcha($outputString); |
|
| 172 | + break; |
|
| 173 | + case 'html': |
|
| 174 | + $this->setCaptcha($this->_getCAPTCHAAsHTML($outputString)); |
|
| 175 | + break; |
|
| 176 | + case 'javascript': |
|
| 177 | + $this->setCaptcha($this->_getCAPTCHAAsJavascript($outputString)); |
|
| 178 | + break; |
|
| 179 | + default: |
|
| 180 | + throw new Text_CAPTCHA_Exception('Invalid output option given'); |
|
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
@@ -140,20 +140,20 @@ |
||
| 140 | 140 | public function createCAPTCHA() |
| 141 | 141 | { |
| 142 | 142 | switch ($this->_severity) { |
| 143 | - case 1: |
|
| 144 | - list($equation, $phrase) = $this->_createSimpleEquation(); |
|
| 145 | - break; |
|
| 146 | - case 2: |
|
| 147 | - list($eq1, $sol1) = $this->_createSimpleEquation(); |
|
| 148 | - list($eq2, $sol2) = $this->_createSimpleEquation(); |
|
| 149 | - $op3 = $this->_operators[mt_rand(0, count($this->_operators) - 1)]; |
|
| 150 | - list(, $phrase) = $this->_solveSimpleEquation($sol1, $sol2, $op3); |
|
| 151 | - $equation = sprintf($op3, '(' . $eq1 . ')', '(' . $eq2 . ')'); |
|
| 152 | - break; |
|
| 153 | - default: |
|
| 154 | - throw new Text_CAPTCHA_Exception( |
|
| 155 | - 'Equation complexity of ' . $this->_severity . ' not supported' |
|
| 156 | - ); |
|
| 143 | + case 1: |
|
| 144 | + list($equation, $phrase) = $this->_createSimpleEquation(); |
|
| 145 | + break; |
|
| 146 | + case 2: |
|
| 147 | + list($eq1, $sol1) = $this->_createSimpleEquation(); |
|
| 148 | + list($eq2, $sol2) = $this->_createSimpleEquation(); |
|
| 149 | + $op3 = $this->_operators[mt_rand(0, count($this->_operators) - 1)]; |
|
| 150 | + list(, $phrase) = $this->_solveSimpleEquation($sol1, $sol2, $op3); |
|
| 151 | + $equation = sprintf($op3, '(' . $eq1 . ')', '(' . $eq2 . ')'); |
|
| 152 | + break; |
|
| 153 | + default: |
|
| 154 | + throw new Text_CAPTCHA_Exception( |
|
| 155 | + 'Equation complexity of ' . $this->_severity . ' not supported' |
|
| 156 | + ); |
|
| 157 | 157 | } |
| 158 | 158 | $this->setCaptcha($equation); |
| 159 | 159 | $this->setPhrase($phrase); |
@@ -241,17 +241,17 @@ |
||
| 241 | 241 | { |
| 242 | 242 | $this->_setOperation(); |
| 243 | 243 | switch ($this->_operator) { |
| 244 | - case '+': |
|
| 245 | - $this->_doAdd(); |
|
| 246 | - break; |
|
| 247 | - case '-': |
|
| 248 | - $this->_doSubtract(); |
|
| 249 | - break; |
|
| 250 | - default: |
|
| 251 | - $this->_operator = "+"; |
|
| 252 | - $this->_setOperation(); |
|
| 253 | - $this->_doAdd(); |
|
| 254 | - break; |
|
| 244 | + case '+': |
|
| 245 | + $this->_doAdd(); |
|
| 246 | + break; |
|
| 247 | + case '-': |
|
| 248 | + $this->_doSubtract(); |
|
| 249 | + break; |
|
| 250 | + default: |
|
| 251 | + $this->_operator = "+"; |
|
| 252 | + $this->_setOperation(); |
|
| 253 | + $this->_doAdd(); |
|
| 254 | + break; |
|
| 255 | 255 | } |
| 256 | 256 | } |
| 257 | 257 | |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | function create($length = 10, $type = 'pronounceable', $chars = '') |
| 56 | 56 | { |
| 57 | 57 | switch ($type) { |
| 58 | - case 'unpronounceable' : |
|
| 59 | - return Text_Password::_createUnpronounceable($length, $chars); |
|
| 58 | + case 'unpronounceable' : |
|
| 59 | + return Text_Password::_createUnpronounceable($length, $chars); |
|
| 60 | 60 | |
| 61 | - case 'pronounceable' : |
|
| 62 | - default : |
|
| 63 | - return Text_Password::_createPronounceable($length); |
|
| 61 | + case 'pronounceable' : |
|
| 62 | + default : |
|
| 63 | + return Text_Password::_createPronounceable($length); |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
@@ -110,35 +110,35 @@ discard block |
||
| 110 | 110 | function createFromLogin($login, $type, $key = 0) |
| 111 | 111 | { |
| 112 | 112 | switch ($type) { |
| 113 | - case 'reverse': |
|
| 114 | - return strrev($login); |
|
| 113 | + case 'reverse': |
|
| 114 | + return strrev($login); |
|
| 115 | 115 | |
| 116 | - case 'shuffle': |
|
| 117 | - return Text_Password::_shuffle($login); |
|
| 116 | + case 'shuffle': |
|
| 117 | + return Text_Password::_shuffle($login); |
|
| 118 | 118 | |
| 119 | - case 'xor': |
|
| 120 | - return Text_Password::_xor($login, $key); |
|
| 119 | + case 'xor': |
|
| 120 | + return Text_Password::_xor($login, $key); |
|
| 121 | 121 | |
| 122 | - case 'rot13': |
|
| 123 | - return str_rot13($login); |
|
| 122 | + case 'rot13': |
|
| 123 | + return str_rot13($login); |
|
| 124 | 124 | |
| 125 | - case 'rotx': |
|
| 126 | - return Text_Password::_rotx($login, $key); |
|
| 125 | + case 'rotx': |
|
| 126 | + return Text_Password::_rotx($login, $key); |
|
| 127 | 127 | |
| 128 | - case 'rotx++': |
|
| 129 | - return Text_Password::_rotxpp($login, $key); |
|
| 128 | + case 'rotx++': |
|
| 129 | + return Text_Password::_rotxpp($login, $key); |
|
| 130 | 130 | |
| 131 | - case 'rotx--': |
|
| 132 | - return Text_Password::_rotxmm($login, $key); |
|
| 131 | + case 'rotx--': |
|
| 132 | + return Text_Password::_rotxmm($login, $key); |
|
| 133 | 133 | |
| 134 | - case 'ascii_rotx': |
|
| 135 | - return Text_Password::_asciiRotx($login, $key); |
|
| 134 | + case 'ascii_rotx': |
|
| 135 | + return Text_Password::_asciiRotx($login, $key); |
|
| 136 | 136 | |
| 137 | - case 'ascii_rotx++': |
|
| 138 | - return Text_Password::_asciiRotxpp($login, $key); |
|
| 137 | + case 'ascii_rotx++': |
|
| 138 | + return Text_Password::_asciiRotxpp($login, $key); |
|
| 139 | 139 | |
| 140 | - case 'ascii_rotx--': |
|
| 141 | - return Text_Password::_asciiRotxmm($login, $key); |
|
| 140 | + case 'ascii_rotx--': |
|
| 141 | + return Text_Password::_asciiRotxmm($login, $key); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -320,11 +320,11 @@ discard block |
||
| 320 | 320 | $next += 255; |
| 321 | 321 | } |
| 322 | 322 | switch ($next) { // delete white space |
| 323 | - case 0x09: |
|
| 324 | - case 0x20: |
|
| 325 | - case 0x0A: |
|
| 326 | - case 0x0D: |
|
| 327 | - $next++; |
|
| 323 | + case 0x09: |
|
| 324 | + case 0x20: |
|
| 325 | + case 0x0A: |
|
| 326 | + case 0x0D: |
|
| 327 | + $next++; |
|
| 328 | 328 | } |
| 329 | 329 | $tmp .= chr($next); |
| 330 | 330 | } |
@@ -354,11 +354,11 @@ discard block |
||
| 354 | 354 | $next += 255; |
| 355 | 355 | } |
| 356 | 356 | switch ($next) { // delete white space |
| 357 | - case 0x09: |
|
| 358 | - case 0x20: |
|
| 359 | - case 0x0A: |
|
| 360 | - case 0x0D: |
|
| 361 | - $next++; |
|
| 357 | + case 0x09: |
|
| 358 | + case 0x20: |
|
| 359 | + case 0x0A: |
|
| 360 | + case 0x0D: |
|
| 361 | + $next++; |
|
| 362 | 362 | } |
| 363 | 363 | $tmp .= chr($next); |
| 364 | 364 | } |
@@ -388,11 +388,11 @@ discard block |
||
| 388 | 388 | $next += 255; |
| 389 | 389 | } |
| 390 | 390 | switch ($next) { // delete white space |
| 391 | - case 0x09: |
|
| 392 | - case 0x20: |
|
| 393 | - case 0x0A: |
|
| 394 | - case 0x0D: |
|
| 395 | - $next++; |
|
| 391 | + case 0x09: |
|
| 392 | + case 0x20: |
|
| 393 | + case 0x0A: |
|
| 394 | + case 0x0D: |
|
| 395 | + $next++; |
|
| 396 | 396 | } |
| 397 | 397 | $tmp .= chr($next); |
| 398 | 398 | } |
@@ -486,34 +486,34 @@ discard block |
||
| 486 | 486 | */ |
| 487 | 487 | switch($chars) { |
| 488 | 488 | |
| 489 | - case 'alphanumeric': |
|
| 490 | - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
|
| 491 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62; |
|
| 492 | - break; |
|
| 489 | + case 'alphanumeric': |
|
| 490 | + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
|
| 491 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 62; |
|
| 492 | + break; |
|
| 493 | 493 | |
| 494 | - case 'alphabetical': |
|
| 495 | - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
|
| 496 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52; |
|
| 497 | - break; |
|
| 494 | + case 'alphabetical': |
|
| 495 | + $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
|
| 496 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 52; |
|
| 497 | + break; |
|
| 498 | 498 | |
| 499 | - case 'numeric': |
|
| 500 | - $chars = '0123456789'; |
|
| 501 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10; |
|
| 502 | - break; |
|
| 499 | + case 'numeric': |
|
| 500 | + $chars = '0123456789'; |
|
| 501 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 10; |
|
| 502 | + break; |
|
| 503 | 503 | |
| 504 | - case '': |
|
| 505 | - $chars = '_#@%&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
|
| 506 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67; |
|
| 507 | - break; |
|
| 504 | + case '': |
|
| 505 | + $chars = '_#@%&ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; |
|
| 506 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = 67; |
|
| 507 | + break; |
|
| 508 | 508 | |
| 509 | - default: |
|
| 510 | - /** |
|
| 509 | + default: |
|
| 510 | + /** |
|
| 511 | 511 | * Some characters shouldn't be used |
| 512 | 512 | */ |
| 513 | - $chars = trim($chars); |
|
| 514 | - $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars); |
|
| 513 | + $chars = trim($chars); |
|
| 514 | + $chars = str_replace(array('+', '|', '$', '^', '/', '\\', ','), '', $chars); |
|
| 515 | 515 | |
| 516 | - $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars); |
|
| 516 | + $GLOBALS['_Text_Password_NumberOfPossibleCharacters'] = strlen($chars); |
|
| 517 | 517 | } |
| 518 | 518 | |
| 519 | 519 | /** |