git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
login: preview target metadata of linked index pages
[minimedit.git]
/
login
/
index.php
diff --git
a/login/index.php
b/login/index.php
index 8e36628be24128aae6c4664555581390c443694d..a3905d3f739d34ea6b49bf012920c4f3ebf18e91 100644
(file)
--- a/
login/index.php
+++ b/
login/index.php
@@
-1,5
+1,5
@@
<?php
<?php
-if (
!$User
) return;
+if (
$Page->api
) return;
$message = NULL;
if (isset($_POST['mail'])) {
$message = NULL;
if (isset($_POST['mail'])) {
@@
-39,9
+39,12
@@
elseif (isset($_GET['logout'])) {
if (!$User or !$User->login) {
$Page->title = 'Inloggen';
if (isset($_REQUEST['goto'])) {
if (!$User or !$User->login) {
$Page->title = 'Inloggen';
if (isset($_REQUEST['goto'])) {
- if (empty($message)) http_response_code(403);
+ if (empty($message)
+ and !preg_match('(^WhatsApp/)', $_SERVER['HTTP_USER_AGENT'])) {
+ http_response_code(403);
+ }
$target = ltrim($_REQUEST['goto'], '/');
$target = ltrim($_REQUEST['goto'], '/');
- $target = new ArchiveArticle("$target.html");
+ $target = new ArchiveArticle(
file_exists($target) ? "$target/index.html" :
"$target.html");
$target->index; # run forbidden handler to determine metadata
if ($target->title) {
$target->index; # run forbidden handler to determine metadata
if ($target->title) {
@@
-59,7
+62,7
@@
if (!$User or !$User->login) {
if (isset($_REQUEST['goto'])) {
$target = ltrim($_REQUEST['goto'], '/');
if (isset($_REQUEST['goto'])) {
$target = ltrim($_REQUEST['goto'], '/');
- abort("/$target",
302
);
+ abort("/$target",
'303 Return'
);
}
if (isset($Page->raw)) {
}
if (isset($Page->raw)) {