1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

BUG ./ cmd !!!

Discussion in 'Plugin Help' started by Bluzzi, Dec 2, 2016.

  1. Bluzzi

    Bluzzi Spider Jockey

    Messages:
    46
    Hello ! There is a huge bug, when a player connects with an account of an OP it can even if it does not login do ./ and a command, it meux op the others or do all the commands!

    A code to fix that?
     
  2. HBIDamian

    HBIDamian HBIDamian Staff Member

    Messages:
    365
    GitHub:
    HBIDamian
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    it seems like it is the problem of your plugin that requires plugin help. Moving to "Plugin Help".

    Also, please specify the plugins you use.
     
    Last edited: Dec 3, 2016
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    blame your auth plugin for not checking ./ based commands
     
    SOFe likes this.
  5. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    PHP:
    public function removeCommands(\pocketmine\event\player\PlayerCommandPreprocessEvent $event){
    $command explode(" "strtolower($event->getMessage()));
          
    $com $command[0];
       if(
    substr($com02) === "./"){
            
    $event->setCancelled();
        }
    }
    Copy this in a plugin's Main.php after the end of a function!
     
    Last edited: Dec 3, 2016
  6. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    774
    GitHub:
    dktapps
  7. reidq7

    reidq7 Spider

    Messages:
    11
    GitHub:
    reidq7
    If you're using SimpleAuth, download SimpleAuthHelper. If HereAuth or another one, enable the option to login without /login. Hacky fix but ehh.
     
  8. andrew1481432

    andrew1481432 Creeper

    Messages:
    4
    GitHub:
    andrew1481432
  9. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Don't think so after this commit...
    It changes "./" into "/", so you can't check if the message contained a "." before the "/". By the time you check it (assuming preprocess ev), the "./" has already been changed to "/"
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.