mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-26 21:11:15 -05:00
soft_api allows to bypass blockwords
This commit is contained in:
parent
2c17ac8e24
commit
f03278fb7b
@ -40,10 +40,7 @@ class Api extends Main
|
|||||||
function create()
|
function create()
|
||||||
{
|
{
|
||||||
|
|
||||||
// if config soft_api is set, allow interaction:
|
if (config_item('apikey') != $this->input->get('apikey') && config_item('soft_api') == false)
|
||||||
// without api_key: use blockwords
|
|
||||||
// with api_key: pass blockwords
|
|
||||||
if (config_item('apikey') != $this->input->get('apikey'))
|
|
||||||
{
|
{
|
||||||
die("Invalid API key\n");
|
die("Invalid API key\n");
|
||||||
}
|
}
|
||||||
@ -77,10 +74,20 @@ class Api extends Main
|
|||||||
die("You are not allowed to paste\n");
|
die("You are not allowed to paste\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config_item('soft_api') == true && (config_item('apikey') == $this->input->get('apikey')))
|
||||||
|
{
|
||||||
|
|
||||||
|
//pass
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
if (!$this->_blockwords_check())
|
if (!$this->_blockwords_check())
|
||||||
{
|
{
|
||||||
die("Your paste contains blocked words\n");
|
die("Your paste contains blocked words\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//create paste
|
//create paste
|
||||||
$paste_url = $this->pastes->createPaste();
|
$paste_url = $this->pastes->createPaste();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user