deStrO / eBot-CSGO-Web

The eBot CS:GO panel
http://www.esport-tools.net/ebot
95 stars 71 forks source link

New eBot CS2 webpanel #110

Open Flegma opened 1 year ago

Flegma commented 1 year ago

Hello, i've managed to get the webpanel for the new CS2 eBot to run, but by doing so, i've found that there are some problems/bugs.

I'm runing the webpanel on Ubuntu 22.04 LTS server (LAMP stack with PHP 7.4).

  1. lib/JWT.class.php - not reading the key from the config/app_user.yml properly - in the __construct the $key variable is empty, so validateConfig() is returning that the key is empty, even when configured in the app_user.yml - this returns HTTP 500. Solved by passing the key directly in JWT.class.php (but this shouldnt be used in production environment).

  2. Empty response header name - Also a HTTP 500, which can be solved (for the index) by editing apps/frontend/config/view.yml (comment out default: http_metas) or completely for the whole application if editing lib/vendor/symfony/lib/response/sfWebResponse.class.php (change protected function normalizeHeaderName to ):

protected function normalizeHeaderName($name)
    {
      $out = [];
      array_map(function($record) use (&$out) {
        $out[] = ucfirst(strtolower($record));
      }, explode('-',$name));
      return implode('-',$out);
    }

Maybe the #2 point can be solved with the view.yml so that we dont need to edit Symfony classes?

Thanks for your reply.

deStrO commented 1 year ago

Hello,

Oups, I forgot to remove my hardcoded key for testing purpose. I updated it to use the key in the config file.

For the second issue, I didn't had this issue, can you reproduce it everytime on your setup ?

Thanks for the report !