Code Monkey home page Code Monkey logo

pukoframework's People

Contributors

velliz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

andriawan

pukoframework's Issues

Consitency between session expiry for Bearer, Cookies and Session

Originally, expired is defined as constant variable in Auth Abstract Class

const EXPIRED_ON_CLOSE = null;
const EXPIRED_1_HOUR = 3600;
const EXPIRED_1_DAY = 86400;
const EXPIRED_1_WEEK = 604800;
const EXPIRED_1_MONTH = 2592000;

That constant used with this technique:

Session::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);
Cookies::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);
Bearer::Get(Tamu::Instance())->Login($param['username'], $param['password'], Auth::EXPIRED_1_DAY);

Later, variable expired introduced on config/encryption.php on line "expired = 30" but seems the implementation still not complete across all Auth classes.

Glossary:

Q: expired is set in 30 by default as? hour? day? minute? seconds?
A: Wee will make it as minute.

Categorized Exception with relevant HTTP Response Code

In puko, all error trowed as exceptions. Will great if puko can have another like:

  • Exception (general) - 403
  • Value Exception
  • Render Exception
  • Controller Exception
  • Model Exception

And also:

  • Service un-catch error - (500 + json error page)
  • View un-catch error - (500 + html error page)

Transactional for RDBMS

Until now, pukoframework don't have transactional feature, so i decided to add this function in next release into the PDA section on this framework.

Usage demonstration in my head so far,,, archived in 3 different way:

  • DBI ORM Style
$transaction = DBI::Transactional('primary');

$x = new obj();
...
$x->save($transaction);
...
$y->modify($transaction);
...

$transaction->commit();
$transaction->cancel();
  • DBI Original
$pk = 'id';
$data = [...];
$id = [...];

DBI::Prepare('users', 'primary')->Save($data, $pk, $transaction);
DBI::Prepare('users', 'primary')->Update($id, $data, $transaction);
DBI::Prepare('users', 'primary')->Delete($id, $transaction);

$transaction->commit();
//or
$transaction->cancel();
  • DBI Function Component (Idea comes from doctrine and laravel implementation)
$result = DBI::Transactional('primary', function($DBI) {

   $x = new obj();
   ...
   $x->save($DBI);
   ...
   $y->modify($DBI);
   ...

});

A lot of works happens in DBI class. Witch i must move out the $dbi instance out. So the object is being reusable in the transaction lifecycle.

Let's see if there was a progress in here.

[PTE] Loop with same tags replaced

Outer tag {!Name} also replacing tag {!Name} in loop section.

{!Name}

<!--{!Members}-->
{!Name}
<!--{/Members}-->

So, for now we must have unique value tag to patch this issue.

SQL Injection

DBI class.

DBI->Prepare($sql)->GetData($user, $pass);

has potential SQL injection with key

'=''or'
'

and many SQL keywords.
this must fixed ASAP!

Allowing Templates Empty

Until version 1.0.3 puko framework is throwing error if view file is not found or empty.
Enhancement:

  1. Allow empty HTML
  2. Allow if template master not found

Bisakah saya berkontribusi?

Bisakah saya berhkontribusi? jika iya, bagian mana yang perlu penanganan. Sepertinya framework anda bagus. Namun lebih bagus jika dikelola lebih dari satu orang. Supaya lebih berkembang

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.