<commit_before><?php
class Kwc_Newsletter_Subscribe_ApiController extends Kwf_Controller_Action
{
    protected $_model = 'Kwc_NewsletterCategory_Subscribe_CategoriesModel';
    protected $_subscribe;

    protected function _isAllowedComponent()
    {
        //allow for everyone, as anyone can subscribe in frontend form too
        //TODO: ip whitelist?
        return true;
    }
<commit_msg>disabled csrf check for newsletter subscribe api because anyone can subscribe in frontend too<commit_after><?php
class Kwc_Newsletter_Subscribe_ApiController extends Kwf_Controller_Action
{
    protected $_model = 'Kwc_NewsletterCategory_Subscribe_CategoriesModel';
    protected $_subscribe;

    protected function _isAllowedComponent()
    {
        //allow for everyone, as anyone can subscribe in frontend form too
        //TODO: ip whitelist?
        return true;
    }

    protected function _validateCsrf()
    {
        //allow for everyone, as anyone can subscribe in frontend form too
    }

{'fraction_non_alphanumeric': 0.056943056943056944, 'fraction_numerical': 0.0, 'mean_word_length': 3.6175115207373274, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1202812', 'n_tokens_mistral': 271, 'n_tokens_neox': 255, 'n_words': 85}