Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

@@ -406,9 +406,23 @@ class _Profanity extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
/* Make sure we're not doing something weird like storing a blank URL */
if ( $url )
{
/* If this is an attachment, we never want to do this. */
if ( preg_match( '/<fileStore\.(.+)>/i', $urlToCheck ) )
{
$good = TRUE;
break;
}
/* IF we are moderating all URL's and it's not an attachment, return here. */
if ( $good !== TRUE AND \IPS\Settings::i()->ipb_url_filter_option == 'none' )
{
return TRUE;
}
$url = preg_quote( $url, '/' );
$url = str_replace( '\*', "(.*?)", $url );
/* If it's a blacklist, check that */
if ( \IPS\Settings::i()->ipb_url_filter_option == 'black' )
{
if ( preg_match( '/' . $url . '/i', $urlToCheck ) )
@@ -416,6 +430,7 @@ class _Profanity extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
return TRUE;
}
}
/* If it's a whitelist, check that */
else if ( \IPS\Settings::i()->ipb_url_filter_option == 'white' )
{
/* @note http:// is hard-coded here as we're simply validating that the URL is on the same domain, so the protocol doesn't matter for the base_url replacement */