From 48882f37eff38e09475f45a011e0ae4e832564de Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 15 May 2023 19:01:01 +0200 Subject: [PATCH] Follow-up fix for fwmark 101b5564c267e673afdea97e24a6bd778939abd8 Remove all FwMark settings from client configs (illegal) and QRcode (also illegal). --- handler/routes.go | 3 --- model/client.go | 1 - templates/clients.html | 6 +----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/handler/routes.go b/handler/routes.go index d43d75f9..e443af90 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -357,11 +357,9 @@ func GetClient(db store.IStore) echo.HandlerFunc { return func(c echo.Context) error { clientID := c.Param("id") - qrCodeIncludeFwMark := c.QueryParam("qrCodeIncludeFwMark") qrCodeSettings := model.QRCodeSettings{ Enabled: true, IncludeDNS: true, - IncludeFwMark: qrCodeIncludeFwMark == "true", IncludeMTU: true, } @@ -490,7 +488,6 @@ func EmailClient(db store.IStore, mailer emailer.Emailer, emailSubject, emailCon qrCodeSettings := model.QRCodeSettings{ Enabled: true, IncludeDNS: true, - IncludeFwMark: true, IncludeMTU: true, } clientData, err := db.GetClientByID(payload.ID, qrCodeSettings) diff --git a/model/client.go b/model/client.go index 7a4cb417..be5fa768 100644 --- a/model/client.go +++ b/model/client.go @@ -30,6 +30,5 @@ type ClientData struct { type QRCodeSettings struct { Enabled bool IncludeDNS bool - IncludeFwMark bool IncludeMTU bool } diff --git a/templates/clients.html b/templates/clients.html index 0fa98f7f..94ab6346 100644 --- a/templates/clients.html +++ b/templates/clients.html @@ -472,17 +472,13 @@ const client_id = $("#qr_client_id").val(); const QRCodeImg = $("#qr_code"); const QRCodeA = $("#qr_code_a"); - let include_fwmark = false; - if ($("#qr_include_fwmark").is(':checked')){ - include_fwmark = true; - } QRCodeImg.hide(); $.ajax({ cache: false, method: 'GET', url: '{{.basePath}}/api/client/' + client_id, data: { - qrCodeIncludeFwMark: include_fwmark + }, dataType: 'json', contentType: "application/json",