<commit_before><?php

namespace App\Libs;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use App\Libs\ViewResolver;
use Illuminate\Http\Request;

abstract class Controller extends BaseController{
	
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function __construct(Request $request,ViewResolver $viewResolver){
    	$this->request = $request;	

        $this->view = $viewResolver;

        
       if(app()->isInstalled()){
            foreach(app()->plugins as $plugin){

                    foreach($plugin->getRegister('injectJs',[]) as $js){
                           $this->view->data['jsplugins'][] = str_contains($js,"http")? $js : $plugin->getPath().'/'.$js; 
                    }

            }
        }

    }

    public function redirect($location){
    	return redirect($location);
    }

    public function redirectToSelf(){
        return redirect()->back();
    }

    public function insideLink($location){
    	return redirect(\Config::get('horizontcms.backend_prefix')."/".$location);
    }


}<commit_msg>Revert last commit, to avoid vulnerabilities<commit_after><?php

namespace App\Libs;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use App\Libs\ViewResolver;
use Illuminate\Http\Request;

abstract class Controller extends BaseController{
	
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

    public function __construct(Request $request,ViewResolver $viewResolver){
    	$this->request = $request;	

        $this->view = $viewResolver;

        
       if(app()->isInstalled()){
            foreach(app()->plugins as $plugin){

                    foreach($plugin->getRegister('injectJs',[]) as $js){
                           $this->view->data['jsplugins'][] = $plugin->getPath().'/'.$js; 
                    }

            }
        }
    }

    public function redirect($location){
    	return redirect($location);
    }

    public function redirectToSelf(){
        return redirect()->back();
    }

    public function insideLink($location){
    	return redirect(\Config::get('horizontcms.backend_prefix')."/".$location);
    }


}
{'fraction_non_alphanumeric': 0.12897959183673469, 'fraction_numerical': 0.0, 'mean_word_length': 2.99185667752443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '3791699', 'n_tokens_mistral': 669, 'n_tokens_neox': 669, 'n_words': 125}