Lines Matching +full:update +full:- +full:user +full:- +full:pass -(+path:inc +path:lang) -(+path:lib +path:plugins +path:lang) -(+path:lib +path:tpl +path:dokuwiki +path:lang)

34     return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
62 * Please note: when you pass uninitialized variables, they will implicitly be created
94 return preg_replace('/[\x00-\x1F]+/s', '', $string);
101 * @link http://en.wikipedia.org/wiki/Cross-site_request_forgery
102 * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html
111 $user = $INPUT->server->str('REMOTE_USER');
114 // CSRF checks are only for logged in users - do not generate for anonymous
115 if (trim($user) == '' || trim($session) == '') return '';
116 return PassHash::hmac('md5', $session . $user, auth_cookiesalt());
129 if (!$INPUT->server->str('REMOTE_USER')) return true; // no logged in user, no need for a check
131 if (is_null($token)) $token = $INPUT->str('sectok');
133 msg('Security Token did not match. Possible CSRF attack.', -1);
175 if ($INPUT->server->has('REMOTE_USER')) {
178 $info['client'] = $INPUT->server->str('REMOTE_USER');
189 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
230 $info['subscribed'] = $subManager->userSubscription();
267 $revinfo = $pagelog->getRevisionInfo($REV);
271 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
288 $info['user'] = $revinfo['user'];
293 $info['editor'] = $revinfo['user'] ?: $revinfo['ip'];
296 $info['user'] = null;
303 if ($draft->isDraftAvailable()) {
304 $info['draft'] = $draft->getDraftFilename();
349 * @param array $params array with key-value pairs
374 * @param array $params array with (attribute name-attribute value) pairs
453 * on Windows (non-IIS) systems and to have proper URL encoding
480 strpos($INPUT->server->str('SERVER_SOFTWARE'), 'Microsoft-IIS') === false
707 * and gain information about the user who was blocked.
710 * data['matches'] - array of matches
711 * data['userinfo'] - information about the blocked user
712 * [ip] - ip address
713 * [user] - username (if logged in)
714 * [mail] - mail address (if logged in)
715 * [name] - real name (if logged in)
720 * @param string $text - optional text to check, if not given the globals are used
721 * @return bool - true if a spam word was found
741 '!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i',
748 // read file in chunks of 200 - this should work around the
765 $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
766 if ($INPUT->server->str('REMOTE_USER')) {
767 $data['userinfo']['user'] = $INPUT->server->str('REMOTE_USER');
781 * Honours X-Forwarded-For and X-Real-IP Proxy Headers
799 $ip[] = $INPUT->server->str('REMOTE_ADDR');
800 if ($INPUT->server->str('HTTP_X_FORWARDED_FOR')) {
801 $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_FORWARDED_FOR'))));
803 if ($INPUT->server->str('HTTP_X_REAL_IP')) {
804 $ip = array_merge($ip, explode(',', str_replace(' ', '', $INPUT->server->str('HTTP_X_REAL_IP'))));
807 // remove any non-IP stuff
830 return $ip[count($ip) - 1];
838 * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code
840 * @deprecated 2018-04-27 you probably want media queries instead anyway
848 if ($INPUT->server->has('HTTP_X_WAP_PROFILE')) return true;
850 if (preg_match('/wap\.|\.wap/i', $INPUT->server->str('HTTP_ACCEPT'))) return true;
852 if (!$INPUT->server->has('HTTP_USER_AGENT')) return false;
859 'hand', 'mobi', 'phone', 'cdm', 'up\.b', 'audio', 'SIE\-', 'SEC\-', 'samsung', 'HTC', 'mot\-',
867 if (preg_match("/$uamatches/i", $INPUT->server->str('HTTP_USER_AGENT'))) return true;
880 if (preg_match('/^[a-zA-Z0-9\.]+>/u', $link)) return true;
934 if ((time() - filemtime($lock)) > $conf['locktime']) {
941 if ($ip == $INPUT->server->str('REMOTE_USER') || (session_id() && $session === session_id())) {
966 if ($INPUT->server->str('REMOTE_USER')) {
967 io_saveFile($lock, $INPUT->server->str('REMOTE_USER'));
974 * Unlock a page if it was locked by the user
989 if ($ip == $INPUT->server->str('REMOTE_USER') || $session == session_id()) {
1000 * also makes sure the given text is valid UTF-8
1012 // if the text is not valid UTF-8 we simply assume latin1
1089 if ($evt->advise_before(true)) {
1114 $evt->advise_after();
1163 '@USER@',
1182 $INPUT->server->str('REMOTE_USER'),
1203 * The range parameter needs to have the form "from-to"
1204 * and gives the range of the section in bytes - no
1205 * UTF-8 awareness is needed.
1210 * @param string $range in form "from-to"
1220 [$from, $to] = sexplode('-', $range, 2);
1221 // Make range zero-based, use defaults if marker is missing
1222 $from = $from ? $from - 1 : (0);
1223 $to = $to ? $to - 1 : (strlen($text));
1227 $slices[1] = substr($text, $from, $to - $from);
1276 * @deprecated 2021-11-28
1281 (new PageFile($id))->detectExternalEdit();
1293 * @param string $summary summary of text update
1294 * @param bool $minor mark this saved version as minor update
1300 $data = (new PageFile($id))->saveWikiText($text, $summary, $minor);
1313 $cache->removeCache();
1325 * @deprecated 2021-11-28
1330 return (new PageFile($id))->saveOldRevision();
1360 if ($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
1376 return $subscription->sendPageDiff($to, $tpl, $id, $rev, $summary, $current_rev);
1392 if (!$INPUT->server->has('HTTP_REFERER')) {
1395 $url = parse_url($INPUT->server->str('HTTP_REFERER'));
1418 $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY);
1439 while ($size >= 1024 && ($i < $count - 1)) {
1444 return round($size, $dec) . "\xC2\xA0" . $sizes[$i]; //non-breaking space
1459 $ago = time() - $dt;
1485 * strftime - %f can be used to get the value from datetime_h()
1517 $date_mod = date('Y-m-d\TH:i:s', $int_date);
1539 $obfuscate = ['@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '];
1570 * -1 (infinite size) will be reported as -1
1578 switch (strtoupper(substr($value, -1))) {
1580 $ret = (int) substr($value, 0, -1) * 1024 * 1024 * 1024;
1583 $ret = (int) substr($value, 0, -1) * 1024 * 1024;
1586 $ret = (int) substr($value, 0, -1) * 1024;
1623 $max -= PhpString::strlen($keep);
1629 PhpString::substr($short, 0, $half - 1) .
1631 PhpString::substr($short, $len - $half);
1635 * Return the users real name or e-mail address for use
1638 * @param string|null $username or null when currently logged-in user should be used
1640 * @return string html or plain text(not escaped) of formatted user name
1652 * @param string|null $username or null when currently logged-in user should be used
1654 * @return string html or plain text(not escaped) of formatted user name
1668 'username' => $username, // the unique user name
1681 'userlink' => '', // formatted user name as will be returned
1685 $data['username'] = $username = $INPUT->server->str('REMOTE_USER');
1687 $data['name'] = $INFO['userinfo']['name'] . ' (' . $INPUT->server->str('REMOTE_USER') . ')';
1690 '(<bdi>' . hsc($INPUT->server->str('REMOTE_USER')) . '</bdi>)';
1695 if ($evt->advise_before(true)) {
1698 $info = $auth->getUserData($username);
1722 $info = $auth->getUserData($username);
1731 if (empty($xhtml_renderer->interwiki)) {
1732 $xhtml_renderer->interwiki = getInterwiki();
1734 $shortcut = 'user';
1736 $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists);
1762 $data['userlink'] = $xhtml_renderer->_formatLink($data['link']);
1765 $evt->advise_after();
1777 * @param string $type - type of image 'badge' or 'button'
1789 if (str_starts_with($conf['license'], 'cc-')) {
1815 if ($limit == -1) return true; // unlimited
1862 // check if running on IIS < 6 with CGI-PHP
1864 $INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
1865 (strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) &&
1866 (preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($INPUT->server->str('SERVER_SOFTWARE')), $matches)) &&
1876 // pass info about the redirect back to the test suite
1879 $testRequest->addData('send_redirect', $url);
1933 for ($i = $cnt - 2; $i >= 0; $i -= 2) {
2029 $content = preg_replace('/<!--.*?(-->)/s', '', $content); // comments