Skip to content

Commit ad48d9c

Browse files
committed
Merge branch 'develop'
2 parents 267f2f5 + 7949458 commit ad48d9c

File tree

26 files changed

+527
-92
lines changed

26 files changed

+527
-92
lines changed

.github/workflows/issues.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,27 @@ jobs:
2828
2929
Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
3030
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
31-
and if possible solved.
32-
I'm Marcel and I created floccus a few years ago, maintaining it ever since. I currently work for Nextcloud
31+
and if possible solved. Let me give you a short introduction on what to expect from this issue tracker to avoid misunderstandings.
32+
I'm Marcel. I created floccus a few years ago, and have been maintaining it since. I currently work for Nextcloud
3333
which leaves me with less time for side projects like this one than I used to have.
3434
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
35-
Until then, please be patient.
36-
Note also that GitHub is a place where people meet to make software better *together*. Nobody here is under any obligation
35+
Until then, please be patient. It helps when you stick around to answer follow up questions I may have,
36+
as very few bugs can be fixed directly from the first bug report, without any interaction. If information is missing in your bug report
37+
and the issue cannot be solved without it, I will have to close the issue after a while.
38+
Note also that GitHub in general is a place where people meet to make software better *together*. Nobody here is under any obligation
3739
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
3840
collaborate to make this software better. For everyone.
3941
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
4042
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
4143
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
42-
To continue the development and maintenance of this project in a sustainable way I ask that you donate to the project when opening an issue
43-
(or at least once your issue is solved), if you're not a donor already.
44+
If you cannot lend a helping hand, to continue the development and maintenance of this project in a sustainable way,
45+
I ask that you donate to the project when opening an issue (or at least once your issue is solved), if you're not a donor already.
4446
You can find donation options at <https://floccus.org/donate/>. Thank you!
4547
4648
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the Nextcloud forum,
4749
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
4850
focus on the tech and keep your opinions to yourself.
4951
50-
I look forward to working with you on this issue
52+
Thank you for reading through this primer. I look forward to working with you on this issue!
5153
Cheers :blue_heart:
5254
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## [5.5.0] - 2025-04-09
4+
5+
### New
6+
7+
* feat(Logger): Use IndexedDB to store logs in order to store more
8+
* feat(AdditionFailsafe): Extend failsafe mechanism to prevent creation of excessive amounts of bookmarks
9+
* fix(failsafe): Reduce threshold to 20% OR 1k bookmarks
10+
11+
### Fixed
12+
13+
* fix(Controller): Do not run scheduleSync concurrently for all accounts
14+
* fix(failsafe): Also apply failsafe on upstream changes
15+
* fix(NewAccount): Disable git backend on android/ios
16+
* fix(GoogleDrive): fix "T.includes is not a function" error
17+
* fix(webdav): Validate filesize via PROPFIND to detect partial downloads
18+
319
## [5.4.5] - 2025-03-20
420

521
### Fixed

_locales/en/messages.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@
119119
"Error040": {
120120
"message": "E040: Could not search for your file name in your Google Drive"
121121
},
122+
"Error041": {
123+
"message": "E041: Remote bookmarks file size differs from the content that was actually downloaded from the server. This might be a temporary network issue. If this error persists please contact the server administrator."
124+
},
125+
"Error042": {
126+
"message": "E042: Remote bookmarks file size could not be retrieved. It is impossible to verify that the bookmarks file was downloaded in full. If this error persists please contact the server administrator."
127+
},
128+
"Error043": {
129+
"message": "E043: Failsafe: The current sync run would increase your bookmarks count by {0}%. Refusing to execute. Disable this failsafe in the profile settings if you want to proceed anyway."
130+
},
122131
"LabelWebdavurl": {
123132
"message": "WebDAV URL"
124133
},
@@ -505,16 +514,16 @@
505514
"message": "Failsafe"
506515
},
507516
"DescriptionFailsafe": {
508-
"message": "Sometimes configuration errors or software bugs can cause the unintended removal of data, which is then lost. To prevent that from happening, floccus will not delete more than 50% of your bookmarks in one go unless you disable this failsafe here."
517+
"message": "Sometimes configuration errors or software bugs can cause the unintended removal of data, which is then lost, or the unintended duplication of data, which is then hard to sort out. To prevent this from happening, floccus will not delete more than 20% of your bookmarks in one go and will also not add more than 20% to your bookmarks count in one go, unless you disable this failsafe here."
509518
},
510519
"LabelFailsafeon": {
511-
"message": "Enabled. Don't delete more than 50% of my local bookmarks without asking me first. (Recommended)"
520+
"message": "Enabled. Will not delete or add more than 20% from/to your local bookmarks without asking you first. (Recommended)"
512521
},
513522
"LabelFailsafeoff": {
514-
"message": "Disabled. Allow the removal of more than 50% of my local bookmarks without confirming with me."
523+
"message": "Disabled. Will allow removing or adding more than 20% from/to your local bookmarks without confirming with you."
515524
},
516525
"StatusFailsafeoff": {
517-
"message": "Failsafe disabled. You are at risk for unintended data loss. It is recommended to enable the failsafe in the profile settings."
526+
"message": "Failsafe disabled. You are at risk for unintended data loss or duplication. It is recommended to enable the failsafe in the profile settings."
518527
},
519528
"LabelAdaptergoogledrive": {
520529
"message": "Google Drive"
@@ -673,7 +682,7 @@
673682
"message": "Profile created"
674683
},
675684
"DescriptionAccountcreated": {
676-
"message": "Your profile has been created. You can close this tab now."
685+
"message": "Your profile has been created. You can close this tab now. One more thing: Sync is not a backup. Make sure you have regular backups of your bookmarks."
677686
},
678687
"DescriptionNonhttps": {
679688
"message": "You have entered a server that uses an insecure protocol. It is recommended to only use servers with support for HTTPS."
@@ -718,7 +727,7 @@
718727
"message": "Git over HTTPS"
719728
},
720729
"DescriptionAdaptergit": {
721-
"message": "The Git option syncs your bookmarks by storing them in a file in the provided Git repository. There is no accompanying web UI for this option, but you can use it with any Git hosting server, like Github, Gitlab, Gitea, etc. It can sync http, ftp, data, file and javascript bookmarks. You can not make use of end-to-end encryption when using this option."
730+
"message": "The Git option syncs your bookmarks by storing them in a file in the provided Git repository. There is no accompanying web UI for this option, but you can use it with any Git hosting server, like Github, Gitlab, Gitea, etc. It can sync http, ftp, data, file and javascript bookmarks. You can not make use of end-to-end encryption when using this option. This option is currently not available in the mobile app."
722731
},
723732
"LabelGiturl": {
724733
"message": "Repository URL using HTTP"

_locales/zh_CN/messages.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@
119119
"Error040": {
120120
"message": "E040: 无法在你的 Google 云盘中搜索你的文件名"
121121
},
122+
"Error041": {
123+
"message": "E041:远程书签文件大小和从服务器实际下载的内容大小不一致。这可能是由于临时的网络问题。如果这个错误持续,请联系服务器管理员。"
124+
},
125+
"Error042": {
126+
"message": "E042: 无法获取远程书签文件的大小。无法验证书签文件是否完整下载了该文件。如果这个错误持续,请联系服务器管理员。"
127+
},
128+
"Error043": {
129+
"message": "E043:安全保护:当前同步运行会将你的书签数增加 {0}%。应用拒绝执行本操作。如果你仍想继续进行,请在配置文件的设置中停用该安全保护措施。"
130+
},
122131
"LabelWebdavurl": {
123132
"message": "WebDAV URL"
124133
},
@@ -505,16 +514,16 @@
505514
"message": "安全保护"
506515
},
507516
"DescriptionFailsafe": {
508-
"message": "有时,配置错误或软件Bug可能会在您无意识的情况下自动清除数据,从而导致数据丢失。为阻止这种情况发生,软件将在您一次清除书签达50%以上时自动停止清除操作,除非您关闭以下安全保护开关"
517+
"message": "配置错误或软件故障有时会导致意想不到的数据删除,造成数据丢失,或者导致意想不到的数据重复,使得难以找出重复数据。为了防止以上情形,floccus 不会一次性删除超过 20% 的书签,也不会一次性添加数量超过现有书签 20% 的书签,除非你在此停用这一安全保护措施"
509518
},
510519
"LabelFailsafeon": {
511-
"message": "开启。在未提前告知的情况下,本地书签删除达50%以上时将停止删除。(推荐选择此项"
520+
"message": "已启用。应用不会再不首先询问你的情况下一次性删除或添加超过 20% 的书签(推荐"
512521
},
513522
"LabelFailsafeoff": {
514-
"message": "关闭。在未提前告知的情况下,允许删除50%以上的本地书签。"
523+
"message": "已停用。应用将在不和你确认的情况下一次性添加或删除超过 20% 的书签"
515524
},
516525
"StatusFailsafeoff": {
517-
"message": "已停用安全保护。你有意外丢失数据的风险。建议在配置文件设置中启用它"
526+
"message": "安全保护已停用。你有意外的数据丢失或重复的风险。建议在配置文件设置种启用安全保护"
518527
},
519528
"LabelAdaptergoogledrive": {
520529
"message": "Google Drive"
@@ -673,7 +682,7 @@
673682
"message": "创建了配置"
674683
},
675684
"DescriptionAccountcreated": {
676-
"message": "您的配置已创建。您现在可以关闭此选项卡"
685+
"message": "你的配置文件已创建。现在你可以关闭这个标签页了。还有一件事:同步不是备份。请确保定期备份书签"
677686
},
678687
"DescriptionNonhttps": {
679688
"message": "您输入了一个使用不安全协议的服务器。 建议仅使用支持 HTTPS 的服务器。"
@@ -718,7 +727,7 @@
718727
"message": "HTTPS 连接的 Git"
719728
},
720729
"DescriptionAdaptergit": {
721-
"message": "Git 选项通过将书签存储在所提供的 Git 仓库中的一个文件内来进行书签同步。此选项没有伴随的 web 用户界面,但你可以通过任意 Git 托管服务器,比如 GitHub、Gitlab、Gitea 等使用它。它可以同步 http、ftp、数据、文件和 javascript 书签。使用此选项时,你无法使用端到端加密。"
730+
"message": "Git 选项通过将书签存储在所提供的 Git 仓库中的一个文件内来进行书签同步。此选项没有伴随的 web 用户界面,但你可以通过任意 Git 托管服务器,比如 GitHub、Gitlab、Gitea 等使用它。它可以同步 http、ftp、数据、文件和 javascript 书签。使用此选项时,你无法使用端到端加密。此选项当前在手机应用上不可用。"
722731
},
723732
"LabelGiturl": {
724733
"message": "使用 HTTP 的存储库 URL"

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "org.handmadeideas.floccus"
88
minSdkVersion rootProject.ext.minSdkVersion
99
targetSdkVersion rootProject.ext.targetSdkVersion
10-
versionCode 5004005
11-
versionName "5.4.5"
10+
versionCode 5005000
11+
versionName "5.5.0"
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313
aaptOptions {
1414
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.

ios/App/App.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
INFOPLIST_KEY_NSHumanReadableCopyright = "";
364364
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
365365
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
366-
MARKETING_VERSION = 5.4.1;
366+
MARKETING_VERSION = 5.4.3;
367367
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
368368
MTL_FAST_MATH = YES;
369369
PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark";
@@ -397,7 +397,7 @@
397397
INFOPLIST_KEY_NSHumanReadableCopyright = "";
398398
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
399399
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
400-
MARKETING_VERSION = 5.4.1;
400+
MARKETING_VERSION = 5.4.3;
401401
MTL_FAST_MATH = YES;
402402
PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark";
403403
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -459,7 +459,7 @@
459459
GCC_WARN_UNUSED_FUNCTION = YES;
460460
GCC_WARN_UNUSED_VARIABLE = YES;
461461
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
462-
MARKETING_VERSION = 5.4.1;
462+
MARKETING_VERSION = 5.4.3;
463463
MTL_ENABLE_DEBUG_INFO = YES;
464464
ONLY_ACTIVE_ARCH = YES;
465465
SDKROOT = iphoneos;
@@ -511,7 +511,7 @@
511511
GCC_WARN_UNUSED_FUNCTION = YES;
512512
GCC_WARN_UNUSED_VARIABLE = YES;
513513
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
514-
MARKETING_VERSION = 5.4.1;
514+
MARKETING_VERSION = 5.4.3;
515515
MTL_ENABLE_DEBUG_INFO = NO;
516516
SDKROOT = iphoneos;
517517
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -537,7 +537,7 @@
537537
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
538538
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
539539
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
540-
MARKETING_VERSION = 5.4.1;
540+
MARKETING_VERSION = 5.4.3;
541541
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
542542
PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus;
543543
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -567,7 +567,7 @@
567567
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
568568
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
569569
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
570-
MARKETING_VERSION = 5.4.1;
570+
MARKETING_VERSION = 5.4.3;
571571
PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus;
572572
PRODUCT_NAME = "$(TARGET_NAME)";
573573
PROVISIONING_PROFILE_SPECIFIER = "";

package-lock.json

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "floccus",
3-
"version": "5.4.5",
3+
"version": "5.5.0",
44
"description": "Sync your bookmarks privately across browsers and devices",
55
"scripts": {
66
"build": "NODE_OPTIONS=--max-old-space-size=5000 gulp",
@@ -97,6 +97,7 @@
9797
"buffer": "^6.0.3",
9898
"cheerio": "^1.0.0-rc.12",
9999
"core-js": "3.x",
100+
"dexie": "^4.0.11",
100101
"fast-xml-parser": "^4.2.7",
101102
"humanize-duration": "^3.25.1",
102103
"intl-messageformat": "^9.9.1",

src/errors/Error.ts

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,14 @@ export class InterruptedSyncError extends FloccusError {
240240

241241
// code 28 is unused
242242

243-
export class FailsafeError extends FloccusError {
243+
export class DeletionFailsafeError extends FloccusError {
244244
public percent: number
245245

246246
constructor(percent:number) {
247247
super(`E029: Failsafe: The current sync run would delete ${percent}% of your bookmarks. Refusing to execute. Disable this failsafe in the profile settings if you want to proceed anyway.`)
248248
this.code = 29
249249
this.percent = percent
250-
Object.setPrototypeOf(this, FailsafeError.prototype)
250+
Object.setPrototypeOf(this, DeletionFailsafeError.prototype)
251251
}
252252
}
253253

@@ -341,4 +341,31 @@ export class GoogleDriveSearchError extends FloccusError {
341341
this.code = 40
342342
Object.setPrototypeOf(this, GoogleDriveSearchError.prototype)
343343
}
344+
}
345+
346+
export class FileSizeMismatch extends FloccusError {
347+
constructor() {
348+
super('E041: Remote bookmarks file size differs from the content that was actually downloaded from the server. This might be a temporary network issue. If this error persists please contact the server administrator.')
349+
this.code = 41
350+
Object.setPrototypeOf(this, FileSizeMismatch.prototype)
351+
}
352+
}
353+
354+
export class FileSizeUnknown extends FloccusError {
355+
constructor() {
356+
super('E042: Remote bookmarks file size could not be retrieved. It is impossible to verify that the bookmarks file was downloaded in full. If this error persists please contact the server administrator.')
357+
this.code = 42
358+
Object.setPrototypeOf(this, FileSizeUnknown.prototype)
359+
}
360+
}
361+
362+
export class AdditionFailsafeError extends FloccusError {
363+
public percent: number
364+
365+
constructor(percent:number) {
366+
super(`E043: Failsafe: The current sync run would increase your bookmarks count by ${percent}%. Refusing to execute. Disable this failsafe in the profile settings if you want to proceed anyway.`)
367+
this.code = 43
368+
this.percent = percent
369+
Object.setPrototypeOf(this, AdditionFailsafeError.prototype)
370+
}
344371
}

src/lib/Account.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ export default class Account {
198198
Logger.log(
199199
'Resource is locked, trying again soon'
200200
)
201-
await Logger.persist()
202201
return
203202
}
204203
} else {
@@ -348,7 +347,6 @@ export default class Account {
348347
await this.init()
349348
}
350349
}
351-
await Logger.persist()
352350
}
353351

354352
static async stringifyError(er:any):Promise<string> {

0 commit comments

Comments
 (0)