Fix web app samesite and broken plpgsql

This commit is contained in:
Daniel 2024-10-20 10:51:12 -04:00
parent 5131da0451
commit f6fd5f7089
2 changed files with 3 additions and 3 deletions

View file

@ -137,7 +137,7 @@ func (a *authenticator) routeRefresh(w http.ResponseWriter, r *http.Request) {
if a.allowInsecureCookie(r) {
cookie.Secure = false
cookie.SameSite = http.SameSiteNoneMode
cookie.SameSite = http.SameSiteLaxMode
log.Debug().Msg("same site none")
}
@ -181,7 +181,7 @@ func (a *authenticator) routeAuth(w http.ResponseWriter, r *http.Request) {
if a.allowInsecureCookie(r) {
cookie.Secure = false
cookie.SameSite = http.SameSiteNoneMode
cookie.SameSite = http.SameSiteLaxMode
} else {
cookie.Domain = a.cfg.Domain
}

View file

@ -76,7 +76,7 @@ BEGIN
IF NOT EXISTS (
SELECT tg.system_id, tg.tgid, tg.name, tg.alpha_tag FROM talkgroups tg WHERE tg.system_id = NEW.system AND tg.tgid = NEW.talkgroup
UNION
SELECT tgl.system_id, tgl.tgid, tgl.name, tg.alpha_tag FROM talkgroups_learned tgl WHERE tgl.system_id = NEW.system AND tgl.tgid = NEW.talkgroup
SELECT tgl.system_id, tgl.tgid, tgl.name, tgl.alpha_tag FROM talkgroups_learned tgl WHERE tgl.system_id = NEW.system AND tgl.tgid = NEW.talkgroup
) THEN
INSERT INTO talkgroups_learned(system_id, tgid, name, alpha_tag) VALUES(
NEW.system, NEW.talkgroup, NEW.tg_label, NEW.alpha_tag