Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Restrict legacy file upload URLs for 75% of older accounts (#14312)

neeraj-pilot9f22dc53bf69
diff --git a/server/pkg/api/file.go b/server/pkg/api/file.go
index 62e21026c9..d8a3230bec 100644
--- a/server/pkg/api/file.go
+++ b/server/pkg/api/file.go
@@ -210,7 +210,7 @@ func (h *FileHandler) RestrictLegacyUploads(c *gin.Context) {
return
}
cutoff := gTime.Date(2026, gTime.April, 1, 0, 0, 0, 0, gTime.UTC).UnixMicro()
- if user.CreationTime >= cutoff || user.ID%2 == 0 {
+ if user.CreationTime >= cutoff || user.ID%4 != 1 {
c.AbortWithStatusJSON(http.StatusGone, gin.H{"error": "This upload API is no longer supported. Please update your app."})
}
}