• Johnny Bergström's avatar
    fix(tiller): Supersede multiple deployments (#3539) · 5847d922
    Johnny Bergström authored
    * add test for rolling back from a FAILED deployment
    
    * Update naming of release variables
    
    Use same naming as the rest of the file.
    
    * Update rollback test
    
    - Add logging
    - Verify other release names not changed
    
    * fix(tiller): Supersede multiple deployments
    
    There are cases when multiple revisions of a release has been
    marked with DEPLOYED status. This makes sure any previous deployment
    will be set to SUPERSEDED when doing rollbacks.
    
    Closes #2941 #3513 #3275
    
    (cherry picked from commit 5f1a21bc)
    Unverified
    5847d922
FirebaseRS256.php 608 bytes
<?php
require __DIR__ . '/vendor/autoload.php';
use \Firebase\JWT\JWT;
class FirebaseRS256 {
    function __construct() {
        $this->private_key = file_get_contents('private.pem');
        $this->public_key = file_get_contents('public.pem');
    function encodeJwt($tokenObj) {
        return JWT::encode($tokenObj, $this->private_key, 'RS256');
    function decodeJwt($token) {
        // Explicitly configured to be vulnerable:
        // we expect a RS256 signature, but also accept a HS256 signature.
        return JWT::decode($token, $this->public_key, ['RS256', 'HS256']);