Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Integrity #3

Merged
merged 4 commits into from
May 30, 2024
Merged

Data Integrity #3

merged 4 commits into from
May 30, 2024

Conversation

Danieloni1
Copy link
Collaborator

No description provided.

@Danieloni1 Danieloni1 requested a review from danpe May 23, 2024 09:38
@Danieloni1 Danieloni1 force-pushed the daniel/dev-1138-data-integrity branch 11 times, most recently from 177f16b to 218b000 Compare May 23, 2024 13:36
)

func UploadMediaAsync(r *http.Request, rctx rcontext.RequestContext, user _apimeta.UserInfo) interface{} {
server := _routers.GetParam("server", r)
mediaId := _routers.GetParam("mediaId", r)
filename := filepath.Base(r.URL.Query().Get("filename"))
// GK-CUSTOMIZATION: Sanitize the filename
if len(filename) > 24 {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Danieloni1 this should be set in the config.yaml under "Uploads"

util/mxc.go Outdated

// GK-CUSTOMIZATION: Supported file types
var supportedFileTypes = []string{
"docx",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Danieloni1 lets also move this to config yaml?
There's a nice example of having this kind of array at the thumbnails section

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Danieloni1 Danieloni1 force-pushed the daniel/dev-1138-data-integrity branch from 216f1f9 to 10bb402 Compare May 28, 2024 09:47
@Danieloni1 Danieloni1 force-pushed the daniel/dev-1138-data-integrity branch 2 times, most recently from 2670865 to 75237a7 Compare May 28, 2024 10:18
@Danieloni1 Danieloni1 changed the title 🧼 Validate filenames Length. Data Integrity May 28, 2024
@Danieloni1 Danieloni1 force-pushed the daniel/dev-1138-data-integrity branch from 75237a7 to 06337a5 Compare May 28, 2024 14:18
@danpe
Copy link

danpe commented May 29, 2024

👍

@Danieloni1 Danieloni1 force-pushed the daniel/dev-1138-data-integrity branch from 06337a5 to aa4f010 Compare May 29, 2024 15:11
@Danieloni1 Danieloni1 merged commit 72360d0 into master May 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants