Loading...
 

RSS should have permissions checking

Status
Closed
Subject
RSS should have permissions checking
Version
1.9.x
Category
  • Error
Feature
Wiki (page view, edit, history, rename, etc)
Article
Blog
Trackers
Image Gallery
File Gallery (elFinder or standard UI)
Directory (of hyperlinks)
RSS
Resolution status
Fixed or Solved
Submitted by
mrisch
Volunteered to solve
mrisch
Lastmod by
mrisch
Rating
(0)
Description
The RSS feeds seem to have no permission checking. The feeds should only include information that is available to Anonymous.
Solution

Here is a tweak that fixes it - the issue was category views - can someone modify tikilib.php and check in?

// Function that checks for:
// - tiki_p_admin
// - the permission itself
// - individual permission
// - category permission
// if O.K. this function shall replace similar constructs in list_pages and other functions above.
// $categperm is the category permission that should grant $perm. if none, pass 0
function user_has_perm_on_object($user,$object,$objtype,$perm,$categperm='tiki_p_view_categories') {
global $feature_categories;
global $userlib;
// superadmin

if($userlib->user_has_permission($user, 'tiki_p_admin')) {
return(TRUE);
}
//mod changed order
// no individual and no category perms. So has the user the perm itself?
if (is_array($perm)) {
foreach($perm as $p) {
if(!$userlib->user_has_permission($user, $p)) {
return(FALSE);
}
}
} else {
if(!$userlib->user_has_permission($user, $perm)) {
return(FALSE);
}
}

if ($userlib->object_has_one_permission($object, $objtype)) {
// wiki permissions override category permissions
//handle multiple permissions
if(is_array($perm)) {
foreach($perm as $p) {
if(!$userlib->object_has_permission($user, $object, $objtype,$p)) {
return(FALSE);
}
}
} else {
if (!$userlib->object_has_permission($user, $object, $objtype,$perm))
{
return(FALSE);
}
}
return (TRUE);
} elseif ($feature_categories 'y'&& $categperm ! 0) {

// no wiki permissions so now we check category permissions tiki_p_view_categories
global $categlib;
if (!is_object($categlib)) {
include_once('lib/categories/categlib.php');
}
unset($tiki_p_view_categories); // unset this var in case it was set previously
$perms_array = $categlib->get_object_categories_perms($user, $objtype, $object);
if ($perms_array) {
$is_categorized = TRUE;
foreach ($perms_array as $p => $value) {
$$p = $value;
}
if ($tiki_p_admin_categories 'y' && $tiki_p_view_categories 'n')
$tiki_p_view_categories = 'y';
} else {
$is_categorized = FALSE;
}

if ($is_categorized && !empty($categperm) && $$categperm == 'y') {
//
return(TRUE);
} else {
return(FALSE);
}
// if it has no category perms or the user does not have
// the perms, continue to check individual perms!
}

return(TRUE);
}

Importance
5
Priority
25
Demonstrate Bug (Tiki 19+)
Please demonstrate your bug on show2.tiki.org
 About show2.tiki.org

To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.

Version: Create show2.tiki.org instance
Ticket ID
743
Created
Friday 02 June, 2006 21:58:52 GMT-0000
by Unknown
LastModif
Wednesday 07 June, 2006 18:43:56 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Federated Timesheets
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools

Show PHP error messages