Compare commits

...
3 Commits
Author SHA1 Message Date
Henrique Dias 7a5b964611 chore(release): 2.45.1 2025-11-11 08:10:41 +01:00
Jagadam Dinesh Reddyandjagadam97 6950c2e4d2 fix: share page preview items to contain baseUrl (#5510)
Co-authored-by: jagadam97 <dineshjagadam@hmail.com>
2025-11-11 08:09:19 +01:00
Henrique Dias 291223b3ce Merge commit from fork 2025-11-11 08:06:16 +01:00
4 changed files with 28 additions and 11 deletions

No files matched your search

+7
View File
@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [2.45.1](https://github.com/filebrowser/filebrowser/compare/v2.45.0...v2.45.1) (2025-11-11)
### Bug Fixes
* share page preview items to contain baseUrl ([#5510](https://github.com/filebrowser/filebrowser/issues/5510)) ([6950c2e](https://github.com/filebrowser/filebrowser/commit/6950c2e4d2868f06235f93c0a18b303b4095ca0a))
## [2.45.0](https://github.com/filebrowser/filebrowser/compare/v2.44.2...v2.45.0) (2025-11-01) ## [2.45.0](https://github.com/filebrowser/filebrowser/compare/v2.44.2...v2.45.0) (2025-11-01)
@@ -1,5 +1,9 @@
<template> <template>
<select name="selectAceEditorTheme" v-on:change="change" :value="aceEditorTheme"> <select
name="selectAceEditorTheme"
v-on:change="change"
:value="aceEditorTheme"
>
<option v-for="theme in themes" :value="theme.theme" :key="theme.theme"> <option v-for="theme in themes" :value="theme.theme" :key="theme.theme">
{{ theme.name }} {{ theme.name }}
</option> </option>
+6 -9
View File
@@ -301,7 +301,7 @@ import { pub as api } from "@/api";
import { filesize } from "@/utils"; import { filesize } from "@/utils";
import dayjs from "dayjs"; import dayjs from "dayjs";
import { Base64 } from "js-base64"; import { Base64 } from "js-base64";
import { createURL } from "@/api/utils";
import HeaderBar from "@/components/header/HeaderBar.vue"; import HeaderBar from "@/components/header/HeaderBar.vue";
import Action from "@/components/header/Action.vue"; import Action from "@/components/header/Action.vue";
import Breadcrumbs from "@/components/Breadcrumbs.vue"; import Breadcrumbs from "@/components/Breadcrumbs.vue";
@@ -354,14 +354,11 @@ const icon = computed(() => {
const link = computed(() => (req.value ? api.getDownloadURL(req.value) : "")); const link = computed(() => (req.value ? api.getDownloadURL(req.value) : ""));
const raw = computed(() => { const raw = computed(() => {
return req.value if (!req.value || !req.value.items[fileStore.selected[0]]) return "";
? req.value.items[fileStore.selected[0]].url.replace( return createURL(
/share/, `api/public/dl/${hash.value}${req.value.items[fileStore.selected[0]].path}`,
"api/public/dl" { token: token.value }
) + );
"?token=" +
token.value
: "";
}); });
const inlineLink = computed(() => const inlineLink = computed(() =>
req.value ? api.getDownloadURL(req.value, true) : "" req.value ? api.getDownloadURL(req.value, true) : ""
+10 -1
View File
@@ -77,7 +77,16 @@ var shareDeleteHandler = withPermShare(func(_ http.ResponseWriter, r *http.Reque
return http.StatusBadRequest, nil return http.StatusBadRequest, nil
} }
err := d.store.Share.Delete(hash) link, err := d.store.Share.GetByHash(hash)
if err != nil {
return errToStatus(err), err
}
if link.UserID != d.user.ID && !d.user.Perm.Admin {
return http.StatusForbidden, nil
}
err = d.store.Share.Delete(hash)
return errToStatus(err), err return errToStatus(err), err
}) })