Giter Club home page Giter Club logo

magento2-log-webapi's People

Contributors

viniciusfabri avatar williankeller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magento2-log-webapi's Issues

Extension throws an exception if input data formatted as XML

Hi,

thanks for free extension!

I just found a bug, which causes extension to crash (and thus the entire system to display an exception report) if API request is formatted as XML.

Example API request:
curl -X POST https://{domain}/api/rest/v1/products/special-price \ -H 'Content-Type: application/xml' \ -H 'Accept: application/xml' -H 'Authorization: Bearer {token}' \ -d '<?xml version="1.0" encoding="UTF-8"?> <request> <prices> <item> <price>30.00</price> <store_id>1</store_id> <sku>0000212121</sku> <price_from>2020-06-08 15:00:00</price_from> <price_to>2020-06-09 23:59:10</price_to> </item> </prices> </request>'

I tracked down the issue, and it seems that the problem is in \Magestat\LogWebapi\Model\Logger::write method. While constructing the $data array, it tries to format the body as json using the standard Magento\Framework\Serialize\SerializerInterface.

I was unable to reproduce the issue on fresh system, if the extension was turned off.

Can we improve specified method to use other serializer/formatter basing on Content-Type header?

Update composer

Look like it is not updated to work with Magento 2.3.3 yet. Please update composer to be compatible.

Code spelling

File vendor/magestat/module-log-webapi/Model/Handler/LogFile.php
"LogWebApi" should be "LogWebapi"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.