Skip to content

Fix forum#3490

Merged
CaMer0n merged 6 commits intoe107inc:masterfrom
phibel:fix_forum
Oct 15, 2018
Merged

Fix forum#3490
CaMer0n merged 6 commits intoe107inc:masterfrom
phibel:fix_forum

Conversation

@phibel
Copy link
Copy Markdown
Contributor

@phibel phibel commented Oct 4, 2018

No description provided.

@CaMer0n
Copy link
Copy Markdown
Member

CaMer0n commented Oct 4, 2018

Excellent @phibel ! Thank you!
I have no time to test, but maybe @rica-carv or @Jimmi08 would like to.

The code looks good to me though.
Merging.

@phibel
Copy link
Copy Markdown
Contributor Author

phibel commented Oct 4, 2018

Thank you @CaMer0n, did you read my commit message 39f42fd ? Any thoughts about that?

…other forum

I am working further on the moderator permissions and discovered that my previous commit
692509f is a bad solution. Because the moderator submits the threadId and postID for the post
who he wants to delete. This threadId was used to check the moderator permissions of the postId.

So if a moderator has only permissions for one forum, he could change the transmitted threadId
in an other forum to get there also moderator permisssions...

Sorry that I did not noticed this glitch before I made the previous commit. :-/
Without admin permissions (member of user class 254) it was not possible to modify threads in
the forum. This fix get the forum-moderator permissions by the threadId to modify this thread.
Looks like someone was interrupted during work and than it was merged into the repo?
Anyway, the needed information are stored in $postInfo[] and not in $row[].
if(!is_array($postInfo) || empty($postInfo))
{
echo 'NOT FOUND!'; return;
return null;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed the return here to "null" and adapted the description.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@CaMer0n CaMer0n merged commit d2171ba into e107inc:master Oct 15, 2018
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