Compare commits

...

8 Commits

Author SHA1 Message Date
Henrique Dias
ffb858e4ef chore(release): 2.33.2 2025-06-21 10:37:30 +02:00
Henrique Dias
0ca8059d8d fix: create user dir on signup 2025-06-21 10:32:50 +02:00
Henrique Dias
8ca080422f chore(release): 2.33.1 2025-06-21 09:25:18 +02:00
Henrique Dias
cbb712484d fix: remove auth query parameter from download and preview links
macOS saves the download URL in the metadata of the downloaded file.
This means that the downloaded file contains a metadata item with the JWT
token of the user. If the user were to share this file with someone else,
they would have access to their account using the JWT in the metadata
during the validity of the JWT.

The JWT has been removed from the URLs. Since the user is logged in, there
is an authentication cookie set. A JWT in the URL is not necessary.
2025-06-21 09:21:39 +02:00
Patrick Wang
8a14018861 fix: downloadUrl of file preview (#3728) 2025-06-21 09:21:17 +02:00
Henrique Dias
a493ec90ff docs: add more docker notes 2025-06-21 08:45:53 +02:00
Henrique Dias
33113036cd docs: update security.md 2025-06-20 21:41:46 +02:00
contributor
a02b2972eb fix: search uses ctrl+shift+f instead of hijacking browser's ctrl+f (#4638) 2025-06-19 21:57:57 +02:00
10 changed files with 36 additions and 27 deletions

View File

@@ -2,6 +2,22 @@
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.33.2](https://github.com/filebrowser/filebrowser/compare/v2.33.1...v2.33.2) (2025-06-21)
### Bug Fixes
* create user dir on signup ([0ca8059](https://github.com/filebrowser/filebrowser/commit/0ca8059d8dea4fe079146471ce4f24acc96021f2))
### [2.33.1](https://github.com/filebrowser/filebrowser/compare/v2.33.0...v2.33.1) (2025-06-21)
### Bug Fixes
* downloadUrl of file preview ([#3728](https://github.com/filebrowser/filebrowser/issues/3728)) ([8a14018](https://github.com/filebrowser/filebrowser/commit/8a14018861fe581672bbd27cdc3ae5691f70a108))
* remove auth query parameter from download and preview links ([cbb7124](https://github.com/filebrowser/filebrowser/commit/cbb712484d3bdabc033acaf3b696ef4f5865813d))
* search uses ctrl+shift+f instead of hijacking browser's ctrl+f ([#4638](https://github.com/filebrowser/filebrowser/issues/4638)) ([a02b297](https://github.com/filebrowser/filebrowser/commit/a02b2972ebde2a58806ad1377bad46e748b63166))
## [2.33.0](https://github.com/filebrowser/filebrowser/compare/v2.32.3...v2.33.0) (2025-06-18)

View File

@@ -52,6 +52,8 @@ docker run \
filebrowser/filebrowser
```
The default user has PID 1000 and GID 1000. Please make sure that this user has access to the different mounted volumes. To change the user running inside the Docker image, you need to use the [`--user` flag](https://docs.docker.com/engine/containers/run/#user).
### s6 overlay
The `s6` image is based on LinuxServer and leverages the [s6-overlay](https://github.com/just-containers/s6-overlay) system for a standard, highly customizable image. It should be used as follows:

View File

@@ -12,7 +12,9 @@ currently being supported with security updates.
## Reporting a Vulnerability
Vulnerabilities should be reported to filebrowser@googlegroups.com - which is a private, maintainer-only group. Maintainers will attempt to respond to/confirm reports within 2-3 days, but if you believe your report to be "critical" to user safety and security, please note as such in the subject. We have tens of thousands of users using our software, and take security vulnerabilities seriously.
Vulnerabilities with critical impact should be reported on the [Security](https://github.com/filebrowser/filebrowser/security) page of this repository, which is a private way of communicating vulnerabilities to maintainers. This project is in maintenance-only mode and it can take a while until someone gets back to you.
If it is not a critical vulnerability, please open an issue and we will categorize it as a security issue. By giving visibility, we can get more help from the community at fixing such issues.
When reporting an issue, where possible, please provide at least:
@@ -21,6 +23,4 @@ When reporting an issue, where possible, please provide at least:
* Steps to reproduce
* Your recommended remediation(s), if any.
The FileBrowser team is a volunteer-only effort, and may reach back out for clarification.
> Note: Please do not open public issues for security issues, as GitHub does not provide facility for private issues, and deleting the issue makes it hard to triage/respond back to the reporter.
The File Browser team is a volunteer-only effort, and may reach back out for clarification.

View File

@@ -75,11 +75,6 @@ export function download(format: any, ...files: string[]) {
url += `algo=${format}&`;
}
const authStore = useAuthStore();
if (authStore.jwt) {
url += `auth=${authStore.jwt}&`;
}
window.open(url);
}

View File

@@ -71,5 +71,5 @@ export function getDownloadURL(res: Resource, inline = false) {
...(res.token && { token: res.token }),
};
return createURL("api/public/dl/" + res.hash + res.path, params, false);
return createURL("api/public/dl/" + res.hash + res.path, params);
}

View File

@@ -41,5 +41,5 @@ export async function create(
}
export function getShareURL(share: Share) {
return createURL("share/" + share.hash, {}, false);
return createURL("share/" + share.hash, {});
}

View File

@@ -76,23 +76,13 @@ export function removePrefix(url: string): string {
return url;
}
export function createURL(endpoint: string, params = {}, auth = true): string {
const authStore = useAuthStore();
export function createURL(endpoint: string, searchParams = {}): string {
let prefix = baseURL;
if (!prefix.endsWith("/")) {
prefix = prefix + "/";
}
const url = new URL(prefix + encodePath(endpoint), origin);
const searchParams: SearchParams = {
...(auth && { auth: authStore.jwt }),
...params,
};
for (const key in searchParams) {
url.searchParams.set(key, searchParams[key]);
}
url.search = new URLSearchParams(searchParams).toString();
return url.toString();
}

View File

@@ -511,8 +511,11 @@ const keyEvent = (event: KeyboardEvent) => {
switch (event.key) {
case "f":
event.preventDefault();
layoutStore.showHover("search");
case "F":
if (event.shiftKey) {
event.preventDefault();
layoutStore.showHover("search");
}
break;
case "c":
case "x":

View File

@@ -253,7 +253,7 @@ const hasPrevious = computed(() => previousLink.value !== "");
const hasNext = computed(() => nextLink.value !== "");
const downloadUrl = computed(() =>
fileStore.req ? api.getDownloadURL(fileStore.req, true) : ""
fileStore.req ? api.getDownloadURL(fileStore.req, false) : ""
);
const raw = computed(() => {
@@ -262,7 +262,7 @@ const raw = computed(() => {
}
if (isEpub.value) {
return createURL("api/raw" + fileStore.req?.path, {}, false);
return createURL("api/raw" + fileStore.req?.path, {});
}
return downloadUrl.value;

View File

@@ -157,6 +157,9 @@ var signupHandler = func(_ http.ResponseWriter, r *http.Request, d *data) (int,
}
user.Password = pwd
if d.settings.CreateUserDir {
user.Scope = ""
}
userHome, err := d.settings.MakeUserDir(user.Username, user.Scope, d.server.Root)
if err != nil {