Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Attachments 2.0 Security bug!
It seems that a user, which is not allowed to access a certain category, can still download the attachments in that category by logging in and entering the attachment download address in the web browser:
Figuring out the attachment id:s is not very hard, since they seem to be sequential. Could we get a quick fix for this, since it's quite critical? I'm going to look into it myself as well, because the fix cannot be very difficult to do.
BR,
Johan
http://www.site.com/vanilla/?PostBackAction=Download&AttachmentID=1
Figuring out the attachment id:s is not very hard, since they seem to be sequential. Could we get a quick fix for this, since it's quite critical? I'm going to look into it myself as well, because the fix cannot be very difficult to do.
BR,
Johan
0
This discussion has been closed.
Comments
if( $Attachment->AttachmentID > 0 ) { /// jaz changes start $DiscussionManager = $this->Context->ObjectFactory->NewContextObject($Context, 'DiscussionManager'); $DiscussionData = $DiscussionManager->GetDiscussionById($Attachment->DiscussionID); if(!$DiscussionData) { // if we cannot fetch the discussion data, we should not be allowed to download // the attached file either! die(); } /// jaz changes end $this->DelegateParameters['DownloadAttachment'] = &$Attachment; $this->CallDelegate('DownloadAttachment'); $Path = str_replace(basename($Attachment->Path), '', $Attachment->Path); SaveAsDialogue($Path, $Attachment->Name); } else { die(); }
Hopefully this can be of some help for those looking for a quick-fix for this security issue. No warranty whatsoever, but it seems to work for me.