Skip to content

Conversation

@juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Sep 29, 2020

Before this PR it is not possible to match workflow rules against application/javascript or application/x-ms-dos-executable since they are not part of the mimetypemappings and the detectContents always uses the secure fallback, so checking for those file types for example always fails:

file detectContent detectPath
.exe application/octet-stream application/x-ms-dos-executable
.js text/plain application/javascript

This PR makes sure that when checking for a workflow rule both the detected type on the content and path are checked.

… be detemined though the content

Signed-off-by: Julius Härtl <[email protected]>
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

sure

@rullzer rullzer added this to the Nextcloud 21 milestone Oct 4, 2020
@rullzer rullzer requested a review from MorrisJobke October 4, 2020 08:52
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

🐘

@MorrisJobke MorrisJobke merged commit fe08f40 into master Oct 5, 2020
@MorrisJobke MorrisJobke deleted the bugfix/noid/mimetypes2 branch October 5, 2020 20:01
@MorrisJobke
Copy link
Member

@juliushaertl Backport?

@juliusknorr
Copy link
Member Author

/backport to stable20

@juliusknorr
Copy link
Member Author

/backport to stable19

@MorrisJobke
Copy link
Member

This one causes the directory checks are not working anymore in the files_accesscontrol app. Because directories are detected as "application/octect-stream" and then a check against "httpd/unix-directory" does not match anymore. Let me check how to fix this.

MorrisJobke added a commit that referenced this pull request Nov 30, 2020
… only for non-directories

Ref #23096

Signed-off-by: Morris Jobke <[email protected]>
backportbot-nextcloud bot pushed a commit that referenced this pull request Dec 2, 2020
… only for non-directories

Ref #23096

Signed-off-by: Morris Jobke <[email protected]>
backportbot-nextcloud bot pushed a commit that referenced this pull request Dec 2, 2020
… only for non-directories

Ref #23096

Signed-off-by: Morris Jobke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants