From 67494aace7c973594888c6483864d84d8b56da3c Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 28 Mar 2020 02:49:02 -0400 Subject: [PATCH] ready to upload on pkglist --- src/Controller/ApiParser.php | 6 +- src/Controller/request.log | 24 -- src/Controller/request2.log | 236 ------------------ src/DependencyInjection/Configuration.php | 12 +- .../FrankspressSgParserExtension.php | 5 +- src/Handler/UploadHandler.php | 23 -- src/Resources/config/routes.xml | 1 + src/Resources/config/services.xml | 2 - 8 files changed, 11 insertions(+), 298 deletions(-) delete mode 100644 src/Controller/request.log delete mode 100644 src/Controller/request2.log diff --git a/src/Controller/ApiParser.php b/src/Controller/ApiParser.php index 6414c65..ecac367 100644 --- a/src/Controller/ApiParser.php +++ b/src/Controller/ApiParser.php @@ -40,8 +40,6 @@ public function __construct( EmailHandler $emailHandler, UploadHandler $uploadHa public function sgParser() { - $milliseconds = round(microtime(true) * 1000); - $newEmail = $this->emailHandler->parseEmail(); $newAttachment = []; @@ -54,9 +52,7 @@ public function sgParser() { $this->eventDispatcher->dispatch( $event,SgParserEvents::PARSER_API ); } - $milliseconds2 = round(microtime(true) * 1000); - // file_put_contents(__DIR__."/timeee.txt", 'time init:'. $milliseconds.' time done:'.$milliseconds2 ); - return new JsonResponse(['success'], 200); + return new JsonResponse([], 200); } diff --git a/src/Controller/request.log b/src/Controller/request.log deleted file mode 100644 index cafa794..0000000 --- a/src/Controller/request.log +++ /dev/null @@ -1,24 +0,0 @@ -Array -( - [attachment1] => Array - ( - [name] => file.jpg - [type] => image/jpeg - [tmp_name] => C:\wamp64\tmp\phpAA10.tmp - [error] => 0 - [size] => 270104 - ) - -) -Array -( - [attachment1] => Array - ( - [name] => Screenshot_20191211_180831_com.bumble.app.jpg - [type] => image/jpeg - [tmp_name] => C:\wamp64\tmp\php1F60.tmp - [error] => 0 - [size] => 112810 - ) - -) diff --git a/src/Controller/request2.log b/src/Controller/request2.log deleted file mode 100644 index d56fceb..0000000 --- a/src/Controller/request2.log +++ /dev/null @@ -1,236 +0,0 @@ -Array -( - [headers] => Received: by mx0021p1mdw1.sendgrid.net with SMTP id Tdr5sfvKw7 Wed, 25 Mar 2020 15:47:46 +0000 (UTC) -Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) by mx0021p1mdw1.sendgrid.net (Postfix) with ESMTPS id 54D8654A65E for ; Wed, 25 Mar 2020 15:47:46 +0000 (UTC) -Received: by mail-vs1-f50.google.com with SMTP id x82so1760719vsc.12 for ; Wed, 25 Mar 2020 08:47:46 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xnZVFW5urmqbQ11yUjwR7qvn7woh5t3Mz+UH/puweis=; b=uYo5S8GVCARjx2UZ8mNkiX/W5iHEolfFhgTl1A8xGVbYnnz1mYSCvPKW+6js3Ju00X PCo7+lSuF/EDibWouqSoy0eRU2qRXLMp2TpQfj8q5TVBMz7I8r+yexbQBaN+eqBic2Jp iJr1lHpAOACrjsf6txoJEc2SEnj8nQp6HOEENAG5hxpUw99oCmK3o933pKu8+qTKF3eq G7CcQ57WJ98OtwCG3Wf9h/+vFXzrkRdMIpwqje9KL4hqXpnQdty3RwPtxBfLCTuHyH67 OoxjEtKZoSyIhz3EA9TOwuc1kg0ZBaXi3rQDQDfcb0GsQIXFFNRB78IlP5D72RXFWhot AT3g== -X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xnZVFW5urmqbQ11yUjwR7qvn7woh5t3Mz+UH/puweis=; b=d0yEFBoFEROixhCTMZ4xKrTcx+WNkiUqNprU9kmO7uBF2trNR2yzolnn7CveYMlG77 /C55CCCEJIc+UhFe7GLOBU5GmIwQtxyl9EWGXWkR8MlALojhdofgz5Ss7q/UuCueIASU XVMGzillt7LdlQ3AP3ed7EFkx5E3Gihdva+dJklJ+UAil/F/Ietu5gyeHO8lwmMhmVEp GSq7fitOFP6EAm7WI+Vk5RRQuIZxjzZ5U23/vqwR4JUta5CjfRsVSk9a5h2l2ZJvxW8I 7rBvE7HXPdLNa/cGr2jA45TJePwtLxQbtBQAdufrCr5L8pYf1EAxKNeD+b+/26klZYnC 7hVw== -X-Gm-Message-State: ANhLgQ0a6tgJQpHToG9ojSQGpAuMtutpNyxcEIGsQicPKybqs/sr06KG 35oCht2pwiADpvrB/AUTqhMnC3uoSyICUjK8cRmKisOE -X-Google-Smtp-Source: ADFU+vuhLJUbHh0s0r3jKIhZT5oEPM3zyLd92upbvb6JwoKF+h2oRT3gdQsPuNf66e9atYkMTkm0uZdpFOsPmWHetY8= -X-Received: by 2002:a67:907:: with SMTP id 7mr3036549vsj.42.1585151264458; Wed, 25 Mar 2020 08:47:44 -0700 (PDT) -MIME-Version: 1.0 -Received: by 2002:a9f:3f44:0:0:0:0:0 with HTTP; Wed, 25 Mar 2020 08:47:43 -0700 (PDT) -In-Reply-To: -References: -From: frank j -Date: Wed, 25 Mar 2020 11:47:43 -0400 -Message-ID: -Subject: Re: NEW MESSAGE RECEIVED -To: FranksPress -Content-Type: multipart/mixed; boundary="00000000000008db7005a1afca94" - - [attachments] => 1 - [dkim] => {@gmail.com : pass} - [subject] => Re: NEW MESSAGE RECEIVED - [to] => FranksPress - [attachment-info] => {"attachment1":{"filename":"woocommerce-logo.png","name":"woocommerce-logo.png","type":"image/png"}} - [from] => frank j - [text] => On 3/25/20, frank j wrote: -> On 3/25/20, frank j wrote: ->> On 3/25/20, frank j wrote: ->>> On 3/25/20, frank j wrote: ->>>> On 3/25/20, frank j wrote: ->>>>> sghhh ->>>>> ->>>>> On 3/25/20, frank j wrote: ->>>>>> On 3/25/20, frank j wrote: ->>>>>>> On 3/25/20, frank j wrote: ->>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>> dfdf ->>>>>>>>>>>> ->>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>> fddfdf ->>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>>>>> vai a fanculo! ->>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>>>>>> fuckkk ->>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ererre ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> what?? ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> dfddfdf ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> On 3/25/20, frank j ->>>>>>>>>>>>>>>>>>>>>>>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>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> wrote: ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #### #### You have got ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Mail ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> on ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> FranksPress! ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Thank you for your ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> business! ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> *- Frank* ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ###### [FranksPress.com ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Web ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Development ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Services ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>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> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>>> ->>>>>>>>>>>>>>> ->>>>>>>>>>>>>> ->>>>>>>>>>>>> ->>>>>>>>>>>> ->>>>>>>>>>> ->>>>>>>>>> ->>>>>>>>> ->>>>>>>> ->>>>>>> ->>>>>> ->>>>> ->>>> ->>> ->> -> - - [sender_ip] => 209.85.217.50 - [envelope] => {"to":["frank@frankspress.com"],"from":"frankieeeit@gmail.com"} - [charsets] => {"to":"UTF-8","subject":"UTF-8","from":"UTF-8","text":"UTF-8"} - [SPF] => pass -) diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 967c640..a497af6 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -24,17 +24,21 @@ public function getConfigTreeBuilder() $rootNode ->children() + ->arrayNode('email') + ->addDefaultsIfNotSet() ->children() ->integerNode('max_body_length')->defaultValue(3000)->info('Int, max body length allowed')->end() - ->booleanNode('raw_response')->defaultValue(true)->info('Returns only the actual email or direct response')->end() - ->booleanNode('raw_subject')->defaultValue(true)->info('Strips RE: from email subject')->end() + ->booleanNode('raw_response')->defaultFalse()->info('Returns only the actual email or direct response')->end() + ->booleanNode('raw_subject')->defaultFalse()->info('Strips RE: from email subject')->end() ->end() ->end() + ->arrayNode('attachment') + ->addDefaultsIfNotSet() ->children() - ->booleanNode('handle_attachment')->defaultTrue()->info('Bool, Attachment download is disabled by default')->end() - ->scalarNode('file_upload_size')->defaultValue('3M')->info('string, Upload size, 1M, 5M etc., see Symfony File Validator for more info')->end() + ->booleanNode('handle_attachment')->defaultFalse()->info('Bool, Attachment download is disabled by default')->end() + ->scalarNode('file_upload_size')->cannotBeEmpty()->defaultValue('3M')->info('string, Upload size, 1M, 5M etc., see Symfony File Validator for more info')->end() ->booleanNode('php_injection')->defaultFalse()->info('Bool, Checks for malicious php code')->end() ->arrayNode('mime_types') ->scalarPrototype()->end() diff --git a/src/DependencyInjection/FrankspressSgParserExtension.php b/src/DependencyInjection/FrankspressSgParserExtension.php index d735f97..a2204bc 100644 --- a/src/DependencyInjection/FrankspressSgParserExtension.php +++ b/src/DependencyInjection/FrankspressSgParserExtension.php @@ -26,6 +26,7 @@ public function load(array $configs, ContainerBuilder $container) $loader->load('services.xml'); $configuration = $this->getConfiguration($configs, $container); + $config = $this->processConfiguration($configuration, $configs); $definition = $container->getDefinition('sg_parser_bundle.api_parser'); @@ -41,10 +42,6 @@ public function load(array $configs, ContainerBuilder $container) $definition->setArgument(3, $config['email']['raw_response']); $definition->setArgument(4, $config['email']['raw_subject']); -// It's a reference to a service @ -//// $definition->setArgument(0, new Reference($config['word_provider'])); -// $container->setAlias('frank_bundle.frank_word_provider', $config['word_provider']); - } } \ No newline at end of file diff --git a/src/Handler/UploadHandler.php b/src/Handler/UploadHandler.php index a1bbcf2..3cf5ccd 100644 --- a/src/Handler/UploadHandler.php +++ b/src/Handler/UploadHandler.php @@ -72,29 +72,6 @@ private function fileValidator(File $file = null ) public function addAttachment() { - -// $attachmentContainer = []; -// $attachmentList = json_decode( $this->request->getCurrentRequest()->get('attachment-info') ); -// -// $file = $this->request->getCurrentRequest()->files->get('img'); -// -// /** @var File $file */ -// -// $attachment = new NewAttachment(); -// $attachment->setFileName( pathinfo($file->getFilename(), PATHINFO_FILENAME) . '.' . $file->guessExtension() ); -// $attachment->setType( $file->guessExtension() ); -// $attachment->setFilePath( $file->getPathname() ); -// $attachment->setSize( $file->getSize() ); -// -// -// if ( ! $this->fileValidator($file) || ! $this->phpInjectionCheck($file) ) { -// $attachment->setError( $this->violationMessage ); -// } -// -// $attachmentContainer [] = $attachment; -// -// return $attachmentContainer; - $attachmentContainer = []; $attachmentList = json_decode( $this->request->getCurrentRequest()->get('attachment-info')); diff --git a/src/Resources/config/routes.xml b/src/Resources/config/routes.xml index 3b9c8b1..ee4a4bb 100644 --- a/src/Resources/config/routes.xml +++ b/src/Resources/config/routes.xml @@ -6,4 +6,5 @@ + \ No newline at end of file diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml index 0316935..5cb5da6 100644 --- a/src/Resources/config/services.xml +++ b/src/Resources/config/services.xml @@ -31,7 +31,5 @@ - - \ No newline at end of file