Redirect to 403 Forbidden

Hi everyone! I’m having a bit of trouble accessing a php file on my site.

Everytime I try to access this file, and only this file, i get redirected to the InfinityFree 403 Forbidden page.

The file permissions and the permissions of the parent directories all seem fine.
Also, the .htaccess and .override files haven’t been changed from the default config.

The site is: http://nightquestbootlegs.epizy.com/
The URL of the file: http://nightquestbootlegs.epizy.com/modules/traders/public/traders.php

Grateful for any help.

Redirect:

File permissions:

Can you copy the contents of the file here? Be sure to ad “~~~” (Without the quotes) before and after the code.

Pretty sure all the includes and other files both exist and have the correct permissions.

<?php
include ('../../../includes/init.inc.php');
include ('../module_functions.inc.php');

if (isset($_REQUEST['traderdetails'])) {
	// Retrieve information for a specific trader
	$trader = GetTraders($db, $dbPrefix, "", $_REQUEST['traderdetails']);
	$smarty->assign('trader', $trader[0]);
	
	// Capture this page's content
	$page = GetPages($db, $dbPrefix, "visitor","",FALSE,"modules/traders/","traders.php");
	$page[0]['description'] = $page[0]['content'];
	$smarty->assign('page', $page[0]);
	$page[0]['content'] = $smarty->fetch($CONFIG['website_path'] . 'skins/' . $skindirectory . '/traders_details.tpl');
	$smarty->assign('page', $page[0]); // Re-assign page data because of updated content
} else {
	// Good Traders
	$good_traders = GetTraders($db, $dbPrefix, "Good","");
	$smarty->assign('good_traders', $good_traders);
	
	// Bad Traders
	$bad_traders = GetTraders($db, $dbPrefix, "Bad","");
	$smarty->assign('bad_traders', $bad_traders);
	
	// Statistics
	$smarty->assign('statistics', GetTradingStatistics($db, $dbPrefix, $sitesettings));

	// Capture this page's content
	$page = GetPages($db, $dbPrefix, "visitor","",FALSE,"modules/traders/","traders.php");
	$page[0]['description'] = $page[0]['content'];
	$smarty->assign('page', $page[0]);
	$page[0]['content'] = $smarty->fetch($CONFIG['website_path'] . 'skins/' . $skindirectory . '/traders_list.tpl');
	$smarty->assign('page', $page[0]); // Re-assign page data because of updated content
}
$smarty->assign('band_header', '');

// Display the template HTML
$smarty->display($CONFIG['website_path'] . 'skins/' . $skindirectory . '/layout.tpl');

I don’t think it’s a permissions issue. Do you get the error when you try to load one of the linked files? I think the anti-fraud or fair use automated systems may be blocking the file (hence the 302 code), but I can’t find anything that might trigger it just by looking at that file.

I can load all the linked files with a 200 status code.

Can changing the name of the file help with the anti-fraud or fair use automated system?
The code is clearly benign.

Maybe? iFastNet keeps those systems a secret, so we only know what we find out through trial and error. It’s worth a show though.

No luck. Changing the names of the file and parent directories didn’t help.
Any suggestions?

The file checker checks the file names and the file content. It will still send it to a 403 even if you change the name.

Yes, i suspected as much.

1 Like

Update, for anyone interested.

Apparently the the anti-fraud or fair use automated system didn’t like the folder named “modules”.
I did some moving around and changed the code to point to the new location and all is fine now.

Thanks everyone who chipped in! :slight_smile:

2 Likes

That’s odd. Maybe Admin has the reason why.

Yep, the modules directory name is blocked. I don’t know when or why it was blocked, but my guess is that it might be that some CMS has a modules folder which contained vulnerable or harmful scripts that were targeted by hackers.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.