]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/auth_internal/init.php
feedbrowser hack
[tt-rss.git] / plugins / auth_internal / init.php
index 0374295f3ec103ab20e824fc602e290bd3d4d967..a6829ac02d276318159e93b5005de30fc79711c5 100644 (file)
@@ -10,6 +10,7 @@ class Auth_Internal extends Plugin implements IAuthModule {
                        true);
        }
 
+    /* @var PluginHost $host */
     function init($host) {
                $this->host = $host;
                $this->pdo = Db::pdo();
@@ -32,11 +33,7 @@ class Auth_Internal extends Plugin implements IAuthModule {
 
                                if ($row = $sth->fetch()) {
 
-                                       require_once "lib/otphp/vendor/base32.php";
-                                       require_once "lib/otphp/lib/otp.php";
-                                       require_once "lib/otphp/lib/totp.php";
-
-                                       $base32 = new Base32();
+                                       $base32 = new \OTPHP\Base32();
 
                                        $otp_enabled = $row['otp_enabled'];
                                        $secret = $base32->encode(sha1($row['salt']));
@@ -52,9 +49,12 @@ class Auth_Internal extends Plugin implements IAuthModule {
                                                } else {
                                                        $return = urlencode($_REQUEST["return"]);
                                                        ?><html>
-                                                               <head><title>Tiny Tiny RSS</title></head>
-                                                               <?php echo stylesheet_tag("css/utility.css") ?>
-                                                       <body class="otp"><div class="content">
+                                                               <head>
+                                                                       <title>Tiny Tiny RSS</title>
+                                                                       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+                                                               </head>
+                                                               <?php echo stylesheet_tag("css/default.css") ?>
+                                                       <body class="ttrss_utility otp"><div class="content">
                                                        <form action="public.php?return=<?php echo $return ?>"
                                                                        method="POST" class="otpform">
                                                                <input type="hidden" name="op" value="login">