Skip to content

Commit b2ec048

Browse files
Fix WebUI
1 parent 03194a6 commit b2ec048

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/confighttp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,7 +1387,7 @@ namespace confighttp {
13871387
sessionCookie = util::hex(crypto::hash(sessionCookieRaw + config::sunshine.salt)).to_string();
13881388
cookie_creation_time = std::chrono::steady_clock::now();
13891389
const SimpleWeb::CaseInsensitiveMultimap headers {
1390-
{ "Set-Cookie", "auth=" + sessionCookieRaw + "; Secure; Max-Age=2592000; Path=/" }
1390+
{ "Set-Cookie", "auth=" + sessionCookieRaw + "; Secure; SameSite=Strict; Max-Age=2592000; Path=/" }
13911391
};
13921392
response->write(headers);
13931393
fg.disable();

src_assets/common/assets/web/config.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,20 @@ <h1 class="my-4">{{ $t('config.configuration') }}</h1>
379379
});
380380
});
381381

382-
this.global_prep_cmd = this.config.global_prep_cmd;
383-
this.server_cmd = this.config.server_cmd;
382+
if (this.platform === 'windows') {
383+
this.global_prep_cmd = this.config.global_prep_cmd.map((i) => {
384+
i.elevated = !!i.elevated
385+
return i
386+
});
387+
this.server_cmd = this.config.server_cmd.map((i) => {
388+
i.elevated = !!i.elevated
389+
return i
390+
});
391+
} else {
392+
this.global_prep_cmd = this.config.global_prep_cmd;
393+
this.server_cmd = this.config.server_cmd;
394+
}
395+
384396
});
385397
},
386398
methods: {

src_assets/common/assets/web/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ <h1 class="mb-0">
101101
const url = new URL(window.location);
102102
const redirectUrl = url.searchParams.get('redir');
103103
const hash = url.hash;
104-
if (redirectUrl) {
104+
if (redirectUrl && redirectUrl.startsWith('.')) {
105105
location.href = redirectUrl + hash;
106106
} else {
107107
location.href = './' + hash;

0 commit comments

Comments
 (0)