Skip to content

Instantly share code, notes, and snippets.

View matiasinsaurralde's full-sized avatar

Matias Insaurralde matiasinsaurralde

  • Paraguay
View GitHub Profile
@matiasinsaurralde
matiasinsaurralde / rails_omakase.rb
Created July 21, 2020 08:28 — forked from postmodern/rails_omakase.rb
Proof-of-Concept exploit for the new Rails Remote Code Execution vulnerability (CVE-2013-0333)
#!/usr/bin/env ruby
#
# Proof-of-Concept exploit for Rails Remote Code Execution (CVE-2013-0333)
#
# ## Advisory
#
# https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo
#
# ## Caveats
#
package pumps
import(
"testing"
"encoding/json"
"github.com/ory/dockertest/v3"
"github.com/TykTechnologies/tyk-pump/analytics"
"context"
"fmt"
"time"
diff --git a/gateway/coprocess.go b/gateway/coprocess.go
index d995dd40..c3160974 100644
--- a/gateway/coprocess.go
+++ b/gateway/coprocess.go
@@ -457,9 +457,9 @@ func (m *CoProcessMiddleware) ProcessRequest(w http.ResponseWriter, r *http.Requ
for api := range returnedSession.AccessRights {
if _, found := existingSession.AccessRights[api]; found {
- if returnedSession.AccessRights[api].Limit != nil && returnedSession.AccessRights[api].Limit != nil {
- returnedSession.AccessRights[api].Limit.QuotaRenews = returnedSession.AccessRights[api].Limit.QuotaRenews
@matiasinsaurralde
matiasinsaurralde / docker-cleanup-resources.md
Created March 22, 2020 00:12 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

{
"name": "Tyk Test API",
"api_id": "1",
"org_id": "default",
"definition": {
"location": "header",
"key": "version"
},
"use_keyless": false,
"auth": {
=== RUN TestGetPaginatedClientTokens/Get_list_of_tokens_without_page_query
time="Jun 14 15:07:43" level=info msg="Getting client tokens sorted list:oauth-client-tokens.023b7052-cea4-411d-8003-595805c1a9d9"
=== RUN TestGetPaginatedClientTokens/Get_list_of_tokens_with_a_page_query_param_lesser_than_0
time="Jun 14 15:07:43" level=info msg="Getting client tokens sorted list:oauth-client-tokens.023b7052-cea4-411d-8003-595805c1a9d9"
2019/06/14 15:07:43 http: panic serving 127.0.0.1:53828: runtime error: slice bounds out of range
goroutine 67500 [running]:
net/http.(*conn).serve.func1(0xc000a7e320)
/home/travis/.gimme/versions/go1.11.11.linux.amd64/src/net/http/server.go:1746 +0x17c
panic(0x15d66e0, 0x270b410)
/home/travis/.gimme/versions/go1.11.11.linux.amd64/src/runtime/panic.go:513 +0x1b9
apt-get update
apt-get install python3.6 python3.6-dev python3-pip redis -y
wget https://packagecloud.io/tyk/tyk-gateway-unstable/packages/ubuntu/xenial/tyk-gateway-python36_2.8.0~93.e8b4438_amd64.deb/download.deb
mv download.deb tyk-gateway.deb
dpkg -i tyk-gateway.deb
pip3 install protobuf
/opt/tyk-gateway/tyk-python --conf=/opt/tyk-gateway/tyk.conf
{
"listen_address": "",
"listen_port": 8080,
"secret": "352d20ee67be67f6340b4c0605b044b7",
"template_path": "/opt/tyk-gateway/templates",
"use_db_app_configs": false,
"app_path": "/opt/tyk-gateway/apps",
"middleware_path": "/opt/tyk-gateway/middleware",
"storage": {
"type": "redis",
{
"_id" : ObjectId("5cd62bc259a7ef6025e549a3"),
"name" : "Matías Insaurralde",
"email" : "[email protected]",
"category" : 1,
"title" : "Expandir modelo de evaluación del producto 7",
"content" : "Hola, me parece que la forma en que se propone medir el producto 7 es poco clara.\r\n\r\nSería bueno que se revele mayor documentación sobre la implementación y se detalle la metodología del informe de progreso.\r\n\r\nSaludos",
"approved" : true
}
var markdownpdf = require("markdown-pdf")
path = require("path")
fs = require("fs")
glob = require("glob")
mkdirp = require("mkdirp")
metadataParser = require('markdown-yaml-metadata-parser')
pdftk = require('node-pdftk')
async = require('async')
var tykDocsPath = "/Users/matias/dev/tyk-docs/tyk-docs"