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

NEW API can receive documents #6160

Merged
merged 2 commits into from
May 20, 2017
Merged

NEW API can receive documents #6160

merged 2 commits into from
May 20, 2017

Conversation

jfefe
Copy link
Contributor

@jfefe jfefe commented Dec 12, 2016

No description provided.


require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';

if (!DolibarrApiAccess::$user->rights->ecm->upload) {
Copy link
Member

@eldy eldy Dec 12, 2016

Choose a reason for hiding this comment

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

To fix security, we must enhance this to use
dol_check_secure_access_document( )
to check if user has permission on module related to where file is uploaded using the "modulepart" value (this is job of method).
Problem: this method currently can be used to test user has permission to read, but not permission to write. We must also add a parameter to test on ->write instead of ->lire

@eldy eldy changed the title API can receive documents NEW API can receive documents Dec 12, 2016
@eldy eldy added PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) labels Jan 27, 2017
@eldy eldy merged commit ef3dc8c into Dolibarr:develop May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR OK to merge PR was analyzed by PR merger and seems ok to be validated. Merge may occurs soon... PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants