fix: use browser redirect page for mx login
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once PLUGIN_ROOT . '/exec/lib/Http.php';
|
||||
|
||||
test('http redirect page performs top level browser navigation', function (): void {
|
||||
$html = Http::redirectPageHtml('https://mx1.domena.pl:2222/api/login/url?key=SECRET&x=1');
|
||||
|
||||
assert_contains('window.top.location.replace', $html);
|
||||
assert_contains('window.location.replace', $html);
|
||||
assert_contains('<meta http-equiv="refresh"', $html);
|
||||
assert_contains('https://mx1.domena.pl:2222/api/login/url?key=SECRET&x=1', $html);
|
||||
assert_contains('https://mx1.domena.pl:2222/api/login/url?key=SECRET\\u0026x=1', $html);
|
||||
});
|
||||
@@ -8,7 +8,7 @@ test('plugin metadata and packaging docs match project rules', function (): void
|
||||
assert_contains('name=mail-login', $conf);
|
||||
assert_contains('id=mail-login', $conf);
|
||||
assert_contains('type=user', $conf);
|
||||
assert_contains('version=1.0.9', $conf);
|
||||
assert_contains('version=1.0.10', $conf);
|
||||
assert_contains('user_run_as=root', $conf);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/src', $packing);
|
||||
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/archives/X.Y.Z/mail-login.tar.gz', $packing);
|
||||
|
||||
Reference in New Issue
Block a user