Code Monkey home page Code Monkey logo

php-tent-client's People

Contributors

collegeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-tent-client's Issues

many headers built wrong, related to issue 3

I think there is a common error in the code when you are building the headers and use curl / curl_setopt_array

You have no keys in the array, only strings
E.g.
array(
'Content-Type:application/vnd.tent.v0+json',
'Accept:application/vnd.tent.v0+json'
)

That would send header
0:'Content-Type:application/vnd.tent.v0+json' etc.

So it should be e.g.
array(
'Content-Type' => 'application/vnd.tent.v0+json',
'Accept' => 'application/vnd.tent.v0+json'
)

PSR-0 and composer.json

Please make your classes follow PSR-0 and add another vendor-namespace, like

lib/TentPHP/Application.php (TentPHP_Application or TentPHP\Application)

See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md

Also a composer.json file to make this library distributable through composer and packagist.org. Composer is a new package management tool that already allows to install over 2000 PHP packages and is used by many major libraries such as Drupal, Symfony2, Zend Framework2.

http://getcomposer.org/
http://www.packagist.org

If you want i could contribute both changes, i really want to see a high quality tent php library early on and this one here is much better than the other one I found.

'error' => 'Invalid MAC Key ID'

Hey there,
callback receives code and state but the response of
'/apps/'.$this->getClientId().'/authorizations'
returns an error saying
'error' => 'Invalid MAC Key ID'

Input validation bypass in RemoteTentRequest.php

Constructor validates entity using:

filter_var($entity, FILTER_VALIDATE_URL)

You should probably also validate the scheme expected using parse_url() to narrow down what's allowed. The function above would validate javascript:, php: and other schemes so basically let's anything that could be construed as a URI get through.

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.