Skip to content

Instantly share code, notes, and snippets.

View PavelPenkov's full-sized avatar

Pavel Penkov PavelPenkov

  • InSales
  • Moscow, Russia
View GitHub Profile
Name: sprockets
Version: 2.2.3.backport2
Advisory: CVE-2014-7819
Criticality: Medium
URL: https://groups.google.com/forum/#!topic/rubyonrails-security/doAVp0YaTqY
Title: Arbitrary file existence disclosure in Sprockets
Solution: upgrade to ~> 2.0.5, ~> 2.1.4, ~> 2.2.3, ~> 2.3.3, ~> 2.4.6, ~> 2.5.1, ~> 2.7.1, ~> 2.8.3, ~> 2.9.4, ~> 2.10.2, ~> 2.11.3, ~> 2.12.3, >= 3.0.0.beta.3
Name: actionpack
Version: 3.2.22
object Experiment {
val rng = new Random()
val incStream: Stream[Int] = 0 #:: 1 #:: incStream.zip(incStream.tail).map{n => n._2 + rng.nextInt(100)}
val randStream: Stream[Int] = rng.nextInt() #:: randStream
}
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index 8e6d88f..29e28ca 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
val dg = lines.foldLeft(Digraph(n)) {(g, line) => line.split(" ").map(_.toInt) match {
case Array(h, t) => g.addEdge(h, t)
}
}
val edges = for(i <- 0 until n; tail <- adj(i)) yield (i, tail)
val reversed = edges.foldLeft(Digraph(n))(_.addEdge(_))
def reversed = adj.zipWithIndex.foldLeft(Digraph(n)){(g, p) => p._1.foldLeft(g){(fg, tail) => fg.addEdge(tail, p._2)}}
class Animal
@@name = 'Animal'
@name = 'Animal'
def self.get_name_wtf
@@name
end
def self.get_name_correct
@name
resp = B.with_benchmark("GET payment info") do
Faraday.post BankerConfig.payments.url, {'CHANNEL' => BankerConfig.payments.channel, 'TGT' => BankerConfig.payments .target, 'o' => id}
end
module B
def self.with_benchmark(metric, &block)
out = nil
ts = Benchmark.realtime do
out = yield
end
class Digraph {
def postOrder(s: Int) = {
val visited = Array[Boolean].fill(n(false))
val ordered = Queue[Int]()
def _postOrder(s: Int) = {
visited[s] = true
adj(s).filterNot(visited).forEach(_postOrder(_))
ordered.enqueue(s)
}
def randomInts : Stream[Int] = rng.nextInt #:: randomInts