Subversion Repositories oidplus

Rev

Rev 1131 | Rev 1160 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1131 Rev 1140
Line 1615... Line 1615...
1615
         * @param string $pubKey
1615
         * @param string $pubKey
1616
         * @return false|string
1616
         * @return false|string
1617
         */
1617
         */
1618
        private static function pubKeyToRaw(string $pubKey) {
1618
        private static function pubKeyToRaw(string $pubKey) {
1619
                $m = array();
1619
                $m = array();
1620
                if (preg_match('@BEGIN PUBLIC KEY\\-+([^\\-]+)\\-+END PUBLIC KEY@ismU', $pubKey, $m)) {
1620
                if (preg_match('@BEGIN PUBLIC KEY\\-+([^\\-]+)\\-+END PUBLIC KEY@imU', $pubKey, $m)) {
1621
                        return base64_decode($m[1], false);
1621
                        return base64_decode($m[1], false);
1622
                }
1622
                }
1623
                return false;
1623
                return false;
1624
        }
1624
        }
1625
 
1625
 
Line 2224... Line 2224...
2224
                } else if (isset($_COOKIE['LANGUAGE'])) {
2224
                } else if (isset($_COOKIE['LANGUAGE'])) {
2225
                        $lang = $_COOKIE['LANGUAGE'];
2225
                        $lang = $_COOKIE['LANGUAGE'];
2226
                } else {
2226
                } else {
2227
                        $lang = self::getDefaultLang();
2227
                        $lang = self::getDefaultLang();
2228
                }
2228
                }
2229
                return substr(preg_replace('@[^a-z]@ismU', '', $lang),0,4); // sanitize
2229
                return substr(preg_replace('@[^a-z]@imU', '', $lang),0,4); // sanitize
2230
        }
2230
        }
2231
 
2231
 
2232
        /**
2232
        /**
2233
         * @return void
2233
         * @return void
2234
         * @throws OIDplusException
2234
         * @throws OIDplusException