[ItchioBridge] add error for password pages (#3252)

This commit is contained in:
SergioFLS 2023-02-08 15:50:21 -03:00 committed by GitHub
parent 4dc6158d5c
commit ed36c8cbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ class ItchioBridge extends BridgeAbstract
{
$url = $this->getInput('url');
$html = getSimpleHTMLDOM($url);
// if the page is password protected, abort
if ($html->find('.game_password_page', 0) !== null) {
returnClientError('The requested page is password protected.');
}
$title = $html->find('.game_title', 0)->innertext;
$content = 'The following files are available to download:<br/>';