Jump to content

Daniel F

Invision Community Team
  • Posts

    6,581
  • Joined

  • Days Won

    37

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Posts posted by Daniel F

  1. 15 minutes ago, Lara Jarrett1 said:

    Is there any way to just show featured clubs, rather than all clubs or member belonging to clubs in the side bar or on a page?

    Thank you. 

     

     

     

    Unfortunately, there's no way to accomplish this, but we have an internal suggestion to add this as an additional filter to our already existing clubs widget.

  2. I have pushed an improvement to not throw any errors here, which will be included in the march release, but till then you'll need to fix this yourself/remove the broken row.

     

    Have you removed any 3rd party apps recently? Are you familiar with MySQL/phpMyAdmin? You'll need to take a look at the core_clubs_node_map table and find the orphaned record(s)

     

     

  3. That's caused by a mapped club node, where the node doesn't exist anymore (AKA a club feature like a forum, gallery category, 3rd party category) was deleted, without being deleted from the club.

    I've seen this with few 3rd party application, where  $contentItemClass::$application was actually not using the correct application id.

  4. I'm not sure why, but recently the number of submissions with some issues related to guests and handling them increased a lot recently.

    Sometimes it's harmless, like showing some content and using \IPS\Member::loggedIn()->member_id in the where condition, but sometimes it's really dangerous because either you're allowing an attacker/or just random visitor to delete all the guest accounts,to spam the board as guest, to flood peoples member table with hundreds of guest accounts and and and... There are dozen of bad scenarios which I've seen in the last months.

    So, when working with the visitor object ( Member::loggedIn() ) in controllers, ask yourself=> Should this controller be accessed by guests at all? If not, just put the following code in the controllers' execute method to block guests.

    
    		/* Logged in?*/
    		if ( !\IPS\Member::loggedIn()->member_id )
    		{
    			\IPS\Output::i()->error( 'no_module_permission', '2....', 403, '' );
    		}

    If it's only related to specific actions, call it in the specific actions! Never trust that a controller or method won't be called by somebody, just because the navbar link is visible to only logged in members:)

     

    Also when you want to change something for the currently logged in member, don't expect that he's logged in! You really should make sure that the member is logged in and not a guest before you start to change some properties and use the save method to store the changes,  otherwise you'll save the guest instance in the members table, which will look like this which in 99.9999% isn't what you want & need;)

    Could contain: Plot, Chart, Page, Text

×
×
  • Create New...