mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
fix(csrf-token): add leading dot to session domain cookie. (#224)
* fix(csrf-token): add leading dot to session domain cookie. * refactor: remove generate key, upgrade axios and keep session domain in null. * refactor: fix PSR-12 code styles for PHP 8.2 compatibility. --------- Co-authored-by: Darko Gjorgjijoski <5760249+gdarko@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
bf0d98c69c
commit
8e96d3e972
@@ -185,7 +185,7 @@ export const useInstallationStore = (useWindow = false) => {
|
||||
})
|
||||
},
|
||||
|
||||
checkAutheticated() {
|
||||
checkAuthenticated() {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get(`/api/v1/auth/check`)
|
||||
|
||||
@@ -87,7 +87,7 @@ async function verifyDomain() {
|
||||
try {
|
||||
await installationStore.setInstallationDomain(formData)
|
||||
await installationStore.installationLogin()
|
||||
let driverRes = await installationStore.checkAutheticated()
|
||||
let driverRes = await installationStore.checkAuthenticated()
|
||||
|
||||
if (driverRes.data) {
|
||||
emit('next', 4)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<form action="" @submit.prevent="next">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 lg:mb-6 md:mb-6">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 mb-6">
|
||||
<BaseInputGroup
|
||||
:label="$t('wizard.database.app_url')"
|
||||
:error="v$.app_url.$error && v$.app_url.$errors[0].$message"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<form action="" @submit.prevent="next">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 lg:mb-6 md:mb-6">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 mb-6">
|
||||
<BaseInputGroup
|
||||
:label="$t('wizard.database.app_url')"
|
||||
:content-loading="isFetchingInitialData"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<form action="" @submit.prevent="next">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 lg:mb-6 md:mb-6">
|
||||
<div class="grid grid-cols-1 gap-5 md:grid-cols-2 mb-6">
|
||||
<BaseInputGroup
|
||||
:label="$t('wizard.database.app_url')"
|
||||
:content-loading="isFetchingInitialData"
|
||||
|
||||
4
resources/scripts/plugins/axios.js
vendored
4
resources/scripts/plugins/axios.js
vendored
@@ -20,11 +20,11 @@ axios.interceptors.request.use(function (config) {
|
||||
const authToken = Ls.get('auth.token')
|
||||
|
||||
if (authToken) {
|
||||
config.headers.common.Authorization = authToken
|
||||
config.headers.Authorization = authToken
|
||||
}
|
||||
|
||||
if (companyId) {
|
||||
config.headers.common['company'] = companyId
|
||||
config.headers.company = companyId
|
||||
}
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user