get rid of session variable in URL

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-03-14 22:51:59 +01:00
parent 2972d95e8b
commit 164b46ece3
56 changed files with 447 additions and 698 deletions

File diff suppressed because one or more lines are too long

View File

@@ -7,9 +7,6 @@
<meta name="robots" content="noindex, nofollow, noarchive"/>
<meta name="googlebot" content="nosnippet"/>
<!-- Session -->
<meta name="froxlor-session" content="{{ s }}">
<!-- CSS -->
{% if theme_css is empty %}
<link href="{{ basehref|default('') }}templates/Froxlor/assets/css/main.css" rel="stylesheet" type="text/css" />

View File

@@ -26,7 +26,6 @@
{% if hiddenid is not empty %}
<input type="hidden" name="id" value="{{ hiddenid }}"/>
{% endif %}
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="action" value="{{ action }}"/>
<input type="hidden" name="send" value="send"/>

View File

@@ -19,7 +19,6 @@
{% endif %}
<hr>
<p class="mb-0">
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="send" value="send"/>
{% for id,field in url_params %}
<input type="hidden" name="{{ id }}" value="{{ field }}"/>

View File

@@ -1,4 +1,4 @@
<a class="nav-link {% if isnewerversion == 0 %}text-success{% else %}text-warning{% endif %}" {% if isnewerversion == 0 %} href="#" {% else %} href="admin_autoupdate.php?page=overview&s={{ s }}" {% endif %} title="{% if isnewerversion == 0 %}{{ additional_info }}{% else %}{{ message }}{% endif %}">
<a class="nav-link {% if isnewerversion == 0 %}text-success{% else %}text-warning{% endif %}" {% if isnewerversion == 0 %} href="#" {% else %} href="admin_autoupdate.php?page=overview" {% endif %} title="{% if isnewerversion == 0 %}{{ additional_info }}{% else %}{{ message }}{% endif %}">
{% if isnewerversion == 0 %}
<i class="fa-solid fa-circle-check me-1"></i>
{% else %}

View File

@@ -16,7 +16,6 @@
</div>
<div>
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="action" value="{{ action }}"/>
<input type="hidden" name="send" value="send"/>

View File

@@ -25,7 +25,7 @@ $(document).ready(function () {
var pid = $(this).val();
if (pid > 0) {
$.ajax({
url: "admin_plans.php?s=" + window.$session + "&page=overview&action=jqGetPlanValues",
url: "admin_plans.php?page=overview&action=jqGetPlanValues",
type: "POST",
data: {
planid: pid

View File

@@ -4,7 +4,7 @@ $(document).ready(function () {
$('#customerid').change(function () {
var cid = $(this).val();
$.ajax({
url: "admin_domains.php?s=" + window.$session + "&page=domains&action=jqGetCustomerPHPConfigs",
url: "admin_domains.php?page=domains&action=jqGetCustomerPHPConfigs",
type: "POST",
data: {
customerid: cid
@@ -36,7 +36,7 @@ $(document).ready(function () {
$('#speciallogfile').removeClass('is-invalid');
$('#speciallogverified').val(0);
$.ajax({
url: "admin_domains.php?s=" + window.$session + "&page=overview&action=jqSpeciallogfileNote",
url: "admin_domains.php?page=overview&action=jqSpeciallogfileNote",
type: "POST",
data: {
id: $('input[name=id]').val(), newval: +$('#speciallogfile').is(':checked')

View File

@@ -7,7 +7,7 @@ $(document).ready(function () {
$('#ipnote').remove();
$('#ip').removeClass('is-invalid');
$.ajax({
url: "admin_ipsandports.php?s=" + window.$session + "&page=overview&action=jqCheckIP",
url: "admin_ipsandports.php?page=overview&action=jqCheckIP",
type: "POST",
data: {
ip: ipval

View File

@@ -10,7 +10,7 @@ $(document).ready(function () {
}
$.ajax({
url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme + "&s=" + window.$session,
url: "lib/ajax.php?action=newsfeed" + role + "&theme=" + window.$theme,
type: "GET",
success: function (data) {
$("#newsfeeditems").html(data);

View File

@@ -20,7 +20,7 @@ $(document).ready(function () {
}
// Search
$.ajax({
url: "lib/ajax.php?action=searchglobal&theme=" + window.$theme + "&s=" + window.$session,
url: "lib/ajax.php?action=searchglobal&theme=" + window.$theme,
type: "POST",
data: {
searchtext: query

View File

@@ -4,7 +4,7 @@ $(document).ready(function () {
*/
if (document.getElementById('updatecheck')) {
$.ajax({
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme + "&s=" + window.$session,
url: "lib/ajax.php?action=updatecheck&theme=" + window.$theme,
type: "GET",
success: function (data) {
$("#updatecheck").html(data);

View File

@@ -6,7 +6,6 @@ global.$ = require('jquery');
$(document).ready(function () {
window.$theme = 'Froxlor';
window.$session = $('meta[name="froxlor-session"]').attr('content');
});
// Load components

View File

@@ -16,24 +16,24 @@
</li>
{% elseif pagination.current_page > 1 %}
<li class="page-item">
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno=1" tabindex="-1">
<a class="page-link" href="?page={{ page }}&action={{ action }}&pageno=1" tabindex="-1">
<i class="fa-solid fa-angles-left"></i>
</a>
</li>
<li class="page-item">
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}" tabindex="-1">
<a class="page-link" href="?page={{ page }}&action={{ action }}&pageno={{ pagination.current_page - 1 }}" tabindex="-1">
<i class="fa-solid fa-chevron-left"></i>
</a>
</li>
{% endif %}
{% if pagination.current_page < pagination.last_page %}
<li class="page-item">
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}" tabindex="-1">
<a class="page-link" href="?page={{ page }}&action={{ action }}&pageno={{ pagination.current_page + 1 }}" tabindex="-1">
<i class="fa-solid fa-chevron-right"></i>
</a>
</li>
<li class="page-item">
<a class="page-link" href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}" tabindex="-1">
<a class="page-link" href="?page={{ page }}&action={{ action }}&pageno={{ pagination.last_page }}" tabindex="-1">
<i class="fa-solid fa-angles-right"></i>
</a>
</li>
@@ -59,8 +59,8 @@
{% if pagination is defined and key in pagination.sortfields %}
<th class="p-3 {{ th.class }}">
{{ th.text }}
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=desc">&darr;</a>
<a href="?s={{ s }}&page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=asc">&uarr;</a>
<a href="?page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=desc">&darr;</a>
<a href="?page={{ page }}&action={{ action }}&pageno={{ pagination.current_page }}&sortfield={{ key }}&sortorder=asc">&uarr;</a>
</th>
{% else %}
<th class="p-3 {{ th.class }}">{{ th.text }}</th>

View File

@@ -20,7 +20,6 @@
</div>
<div class="card-body d-grid gap-2">
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="send" value="send"/>
<button class="btn btn-primary rounded-top-0" type="submit" name="dosave">

View File

@@ -23,7 +23,6 @@
</div>
<div class="card-body d-grid gap-2">
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="send" value="send"/>
<button class="btn btn-primary rounded-top-0" type="submit" name="dosave">

View File

@@ -19,7 +19,6 @@
</div>
<div class="card-body d-grid gap-2">
<input type="hidden" name="s" value="{{ s }}"/>
<input type="hidden" name="page" value="{{ page }}"/>
<input type="hidden" name="send" value="send"/>
<button class="btn btn-primary rounded-top-0" type="submit" name="dosave">

View File

@@ -38,6 +38,11 @@
<ul id="search-dropdown" class="bg-white border list-group list-group-flush position-absolute" style="top: 2.5rem; display:none; z-index: 50; max-height: 300px; overflow-y: scroll"></ul>
</form>
<ul class="navbar-nav ms-auto">
{% if call_static('\\Froxlor\\CurrentUser', 'getField', ['switched_user']) is not empty and call_static('\\Froxlor\\CurrentUser', 'getField', ['switched_user']) is iterable %}
<a class="nav-link text-success" href="{{ linker({'section': 'index', 'action': 'suback'}) }}">
<i class="fa-solid fa-reply me-1"></i> {{ userinfo.switched_user.loginname }}
</a>
{% endif %}
{% if userinfo.adminsession == 1 %}
<li class="nav-item" id="updatecheck"></li>
{% endif %}
@@ -82,13 +87,6 @@
{% endif %}
</ul>
</li>
<!-- if switched-user
<li class="nav-item text-nowrap d-block me-2">
<a class="btn btn-info btn-sm d-block" href="#view=suBack">
<i class="fas fa-undo"></i>
Switch back</a>
</li>
endif -->
<li class="nav-item">
<a class="btn btn-link pe-0" title="{{ lng('login.logout') }}" href="{{ linker({'section': 'index', 'action': 'logout'}) }}">
<i class="fas fa-power-off"></i>