这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e31f4e9
updated stable release workflow (#1458)
gtsteffaniak Oct 28, 2025
f33d058
updated backend logs onlyoffice
gtsteffaniak Oct 28, 2025
dfaccd8
updated with heic convert fix (#1461)
gtsteffaniak Oct 28, 2025
0941f17
updated with change password fix
gtsteffaniak Oct 28, 2025
92168ed
updated only office debugger
gtsteffaniak Oct 29, 2025
53c4fa5
Conditionals check fix (#1462)
gtsteffaniak Oct 29, 2025
79ead39
Add new info prompt (#1465)
gtsteffaniak Oct 29, 2025
b953957
Update ru.json (#1464)
pyroch Oct 29, 2025
39bbf69
Update spanish translations and add translations for help prompt (#1466)
Kurami32 Oct 29, 2025
8fa1438
updated with share property fix (#1467)
gtsteffaniak Oct 30, 2025
60780c9
Fix #1470 (#1472)
lps-rocks Oct 30, 2025
9871d27
updated deps
gtsteffaniak Oct 30, 2025
2c3bef1
update makefile linker flags to properly set version and sha (#1474)
contributor Oct 30, 2025
3f6e9af
cross-platform `npm run watch` (#1473)
contributor Oct 30, 2025
6d33057
Revert "cross-platform `npm run watch`" (#1478)
gtsteffaniak Oct 31, 2025
8371e7a
updated with info page on file preview (#1480)
gtsteffaniak Oct 31, 2025
f48156a
restore settings config
gtsteffaniak Oct 31, 2025
30d2e8a
restore main.go
gtsteffaniak Oct 31, 2025
138c4a9
fix halloween static asset location
gtsteffaniak Oct 31, 2025
02f28b5
Fix path breadcrumbs single source (#1483)
gtsteffaniak Oct 31, 2025
67ff16e
updated without secrets hidden for generated config
gtsteffaniak Oct 31, 2025
01569df
Update Russian translations in ru.json (#1484)
Sarabanga Oct 31, 2025
6baa5d1
`make dev` for git bash (#1489)
gtsteffaniak Oct 31, 2025
095bdff
updated changelog
gtsteffaniak Oct 31, 2025
f6b4310
Fix onlyOffice nextPrevious (#1492)
Kurami32 Nov 1, 2025
f4f2400
hide version for unauthenticated users (#1490)
gtsteffaniak Nov 1, 2025
55620b5
updated login page and icon
gtsteffaniak Nov 1, 2025
e0d9ff2
updated login page and icon (#1494)
gtsteffaniak Nov 2, 2025
403614d
Merge branch 'dev/v1.0.1' of github.com:gtsteffaniak/filebrowser into…
gtsteffaniak Nov 2, 2025
07f37cb
merged
gtsteffaniak Nov 2, 2025
75c8d78
updated workflows (#1499)
gtsteffaniak Nov 2, 2025
809e1e5
patch a few bugs
gtsteffaniak Nov 6, 2025
dc60832
Patch/misc fixes (#1558)
gtsteffaniak Nov 10, 2025
337b958
Merge branch 'main' into stable/v1.0.1
gtsteffaniak Nov 10, 2025
1c8843b
merged completion
gtsteffaniak Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

All notable changes to this project will be documented in this file. For commit guidelines, please refer to [Standard Version](https://github.com/conventional-changelog/standard-version).

## v1.0.1
## v1.0.1-stable

**BugFixes**:
- UserDefault always applies to newly created users #1518
- Updating user's own password sometimes doesn't work
- Anonymous Share link with optional password does not allow downloads #1553
- Share options should go in the meta tags #1511
- Unable to select compression format when downloading multiple files/dir via Share link (v1.0.0) #1557
- fixed sidebar clipping on some browsers like safari
- Files show as Download is not available even though it is #1537

## v1.0.1-beta & v1.0.0-stable

**New Features**:
- login icon support added via `frontend.loginIcon` config path variable
Expand All @@ -27,7 +38,11 @@ All notable changes to this project will be documented in this file. For commit
- fixed some condition that the halloween background doesn't load properly
- some comments not showing up on config viewer in settings

<<<<<<< HEAD
## v1.0.0-beta
=======
## v1.0.0
>>>>>>> main

**Notes**:
- Enhanced onlyoffice debugger with more wholistic backend logs
Expand Down
2 changes: 1 addition & 1 deletion _docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN go build -tags mupdf,musl -ldflags="-w -s \
-o filebrowser .
RUN upx filebrowser

FROM node:lts-slim AS nbuild
FROM node:jod-slim AS nbuild
WORKDIR /app
COPY ./frontend/package.json ./
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func runCLI() bool {
}
newUser.Permissions = settings.Config.UserDefaults.Permissions
newUser.Permissions.Admin = asAdmin
err = storage.CreateUser(newUser)
err = storage.CreateUser(newUser, newUser.Permissions)
if err != nil {
logger.Errorf("could not create user: %v", err)
}
Expand Down
10 changes: 7 additions & 3 deletions backend/common/utils/checkForUpdates.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strings"
"time"

"github.com/gtsteffaniak/filebrowser/backend/common/settings"
"github.com/gtsteffaniak/filebrowser/backend/common/version"
"github.com/gtsteffaniak/go-logger/logger"
"golang.org/x/mod/semver"
Expand All @@ -30,6 +31,9 @@ func CheckForUpdates() (updateInfo, error) {
repoOwner := "gtsteffaniak"
repoName := "filebrowser"
currentVersion := version.Version
if currentVersion == "untracked" || currentVersion == "testing" || currentVersion == "" || settings.Config.Env.IsDevMode {
return updateInfo{}, nil
}
splitVersion := strings.Split(currentVersion, "-")
versionCategory := "stable"
if len(splitVersion) > 1 {
Expand All @@ -51,13 +55,13 @@ func CheckForUpdates() (updateInfo, error) {
if err := json.NewDecoder(resp.Body).Decode(&tags); err != nil {
return updateInfo{}, err
}
// Find the latest beta version greater than the current one
// Find the latest version greater than the current one that matches the version category
var NewVersion string
for _, tag := range tags {
// Check if the version is valid, is a pre-release, and contains "beta"
// Check if the version is valid and the prerelease contains the version category
if semver.IsValid(tag.Name) && strings.Contains(semver.Prerelease(tag.Name), versionCategory) {
// Check if this tag is greater than the current version
// and also greater than any other beta version we've found so far
// and also greater than any other version we've found so far
if semver.Compare(tag.Name, currentVersion) > 0 {
if NewVersion == "" || semver.Compare(tag.Name, NewVersion) > 0 {
NewVersion = tag.Name
Expand Down
4 changes: 4 additions & 0 deletions backend/database/storage/bolt/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func (st usersBackend) Update(user *users.User, actorIsAdmin bool, fields ...str
return err
}

if user.LoginMethod == "" {
user.LoginMethod = existingUser.LoginMethod
}

if !slices.Contains(fields, "Password") {
user.Password = existingUser.Password
} else {
Expand Down
4 changes: 3 additions & 1 deletion backend/database/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func quickSetup(store *bolt.BoltStore) {
}

// create new user
func CreateUser(userInfo users.User) error {
func CreateUser(userInfo users.User, permissions users.Permissions) error {
newUser := &userInfo
newUser.ShowFirstLogin = settings.Config.Env.IsFirstLoad && newUser.Permissions.Admin
if userInfo.LoginMethod == "password" {
Expand All @@ -125,6 +125,8 @@ func CreateUser(userInfo users.User) error {
if userInfo.Username == "" {
return fmt.Errorf("username is required to create a user")
}
settings.ApplyUserDefaults(newUser)
newUser.Permissions = permissions
logger.Debugf("Creating user: %v %v", userInfo.Username, userInfo.Scopes)
// create new home directories
err := userStore.Save(newUser, true, false)
Expand Down
5 changes: 2 additions & 3 deletions backend/http/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func setupProxyUser(r *http.Request, data *requestContext, proxyUser string) (*u
if user.Username == config.Auth.AdminUsername {
user.Permissions.Admin = true
}
err = storage.CreateUser(user)
err = storage.CreateUser(user, user.Permissions)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -223,8 +223,7 @@ func signupHandler(w http.ResponseWriter, r *http.Request, d *requestContext) (i
},
LoginMethod: users.LoginMethodPassword,
}
user.Permissions = settings.Config.UserDefaults.Permissions
err := storage.CreateUser(user)
err := storage.CreateUser(user, settings.Config.UserDefaults.Permissions)
if err != nil {
logger.Debug(err.Error())
// Return the actual error message instead of a generic one
Expand Down
2 changes: 1 addition & 1 deletion backend/http/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ func loginWithOidcUser(w http.ResponseWriter, r *http.Request, username string,
if isAdmin {
user.Permissions.Admin = true
}
err = storage.CreateUser(*user)
err = storage.CreateUser(*user, user.Permissions)
if err != nil {
return http.StatusInternalServerError, err
}
Expand Down
16 changes: 12 additions & 4 deletions backend/http/static.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont

defaultThemeColor := "#455a64"
staticURL := config.Server.BaseURL + "public/static"
description := config.Frontend.Description
title := config.Frontend.Name

// Use custom favicon if configured and validated, otherwise fall back to default
var favicon string
Expand Down Expand Up @@ -148,10 +150,16 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
}
}
if d.share.Description != "" {
data["description"] = d.share.Description
description = d.share.Description
}
if d.share.Title != "" {
data["title"] = d.share.Title
title = d.share.Title
}
if d.share.ShareTheme != "" {
theme, ok := config.Frontend.Styling.CustomThemeOptions[d.share.ShareTheme]
if ok {
userSelectedTheme = theme.CssRaw
}
}
if d.share.ShareTheme != "" {
theme, ok := config.Frontend.Styling.CustomThemeOptions[d.share.ShareTheme]
Expand All @@ -176,7 +184,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
loginIcon := staticURL + "/loginIcon"

data["htmlVars"] = map[string]interface{}{
"title": config.Frontend.Name,
"title": title,
"customCSS": config.Frontend.Styling.CustomCSSRaw,
"userSelectedTheme": userSelectedTheme,
"lightBackground": config.Frontend.Styling.LightBackground,
Expand All @@ -188,7 +196,7 @@ func handleWithStaticData(w http.ResponseWriter, r *http.Request, d *requestCont
"color": defaultThemeColor,
"winIcon": staticURL + "/img/icons/mstile-144x144.png",
"appIcon": staticURL + "/img/icons/android-chrome-256x256.png",
"description": config.Frontend.Description,
"description": description,
}
// variables consumed by frontend as json
data["globalVars"] = map[string]interface{}{
Expand Down
2 changes: 1 addition & 1 deletion backend/http/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func usersPostHandler(w http.ResponseWriter, r *http.Request, d *requestContext)
return http.StatusBadRequest, errors.ErrEmptyPassword
}

err = storage.CreateUser(req.User)
err = storage.CreateUser(req.User, req.User.Permissions)
if err != nil {
return http.StatusInternalServerError, err
}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/api/files.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fetchURL, adjustedData } from './utils'
import { getApiPath, doubleEncode, getPublicApiPath } from '@/utils/url.js'
import { mutations } from '@/store'
import { mutations,state } from '@/store'
import { notify } from '@/notify'
import { globalVars } from '@/utils/constants'

Expand Down Expand Up @@ -101,7 +101,8 @@ export function download(format, files, shareHash = "") {
const apiPath = getApiPath(shareHash == "" ? 'api/raw' : 'public/api/raw', {
files: fileargs,
algo: format,
hash: shareHash
hash: shareHash,
...(state.share.token && { token: state.share.token })
})
const url = window.origin + apiPath

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default {

// Add keyboard event listener for "/" to activate search
this.handleKeydown = (event) => {
if (event.key === '/' && !state.isSearchActive) {
if (event.key === '/' && !state.isSearchActive && getters.currentPrompt() === null) {
event.preventDefault();
this.open();
}
Expand Down
35 changes: 26 additions & 9 deletions frontend/src/components/files/ShareInfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
</div>

<div v-if="!shareInfo.disableDownload" class="share__box__element share__box__center">
<button class="button button--flat clickable" @click="goToDownload()"> {{ $t("buttons.download") }} </button>
<button class="button button--flat clickable" @click="goToDownload()"> {{ $t("buttons.download") }}
</button>
</div>
</div>

Expand All @@ -41,7 +42,7 @@

<script>
import { publicApi } from "@/api";
import { state, getters } from "@/store";
import { state, getters, mutations } from "@/store";
import { getHumanReadableFilesize } from "@/utils/filesizes";
import { getTypeInfo } from "@/utils/mimetype";
import QrcodeVue from "qrcode.vue";
Expand Down Expand Up @@ -115,13 +116,29 @@ export default {
},
methods: {
goToDownload() {
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink, "_blank");
if (state.req.items.length > 1) {
mutations.showHover({
name: "download",
confirm: (format) => {
mutations.closeHovers();
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink + "&format=" + format, "_blank");
},
});
} else {
const downloadLink = publicApi.getDownloadURL({
path: "/",
hash: state.share.hash,
token: state.share.token,
inline: false,
}, [state.req.path]);
window.open(downloadLink, "_blank");
}
},
getShareLink() {
return publicApi.getShareURL({
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/components/sidebar/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,7 @@ button.action {
}

.headline-card {
padding: 1em;
overflow: hidden !important;
min-height: fit-content;
padding: 0.5em;
}

.person-button {
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/utils/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ export default function downloadFiles(items) {
}
if (getters.isShare()) {
// Perform download without opening a new window
startDownload(null, items, state.share.hash);
if (getters.isSingleFileSelected()) {
startDownload(null, items, state.share.hash);
} else {
// Multiple files download with user confirmation
mutations.showHover({
name: "download",
confirm: (format) => {
mutations.closeHovers();
startDownload(format, items, state.share.hash);
},
});
}
return;
}

if (getters.isSingleFileSelected()) {
startDownload(null, items);
return;
} else {
// Multiple files download with user confirmation
mutations.showHover({
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/views/files/ListingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -967,9 +967,6 @@ export default {
mutations.setMultiple(val == true);
showMultipleSelection();
},
openSearch() {
this.currentPrompt = "search";
},
windowsResize: throttle(function () {
this.colunmsResize();
this.width = window.innerWidth;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/files/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default {
},
computed: {
permissions() {
return state.user.permissions;
return getters.permissions();
},
showImage() {
if (state.req.type == "image/heic" || state.req.type == "image/heif") {
Expand Down
Loading