$ pip install click requests
$ python query_export.py --redash-url "https://app.redash.io/" --api-key ""
| 日時: | 2017-12-03 |
|---|---|
| 作: | 時雨堂 |
| バージョン: | 17.6.30 |
| URL: | https://shiguredo.jp/ |
2017 年 6 月 30 日をもって開発/販売を終了しました。
| 今回の問題は、StrutsでHttpリクエストパラメータをFormに入れる際に、commons-beanutilsの | |
| BeanUtils.populateを使っていることに起因する。 | |
| populateの中で使われている、BeanUtils.setPropertyはノーチェックでBeanのプロパティを探すので、 | |
| プロパティ名を"class.classLoader.xxx"のように書いておくと、BeanのgetClassをよんで、 | |
| ClassオブジェクトのgetClassLoaderをよんで、…と連鎖してクラスローダが取得される。 | |
| そしてドットでつないだ最後のプロパティ名で値をセットにいくので、TomcatのWebAppClassLoaderが | |
| 途中でゲットされてしまうと、Struts2の脆弱性と同じ問題が発生してしまう。 |
| import org.gradle.api.tasks.Exec | |
| defaultTasks 'bower' | |
| // Get the path for the locally installed binaries | |
| task npmBin << { | |
| new ByteArrayOutputStream().withStream { os -> | |
| def result = exec { | |
| executable = 'npm' | |
| args = ['bin'] |
| var Benchmark = require('benchmark'); | |
| Benchmark.prototype.setup = function() { | |
| a = ["test"]; | |
| for (var i = 0; i < 10000; i++) { | |
| a.push("some other stuff"); | |
| } | |
| s = a.join(); | |
| re1 = new RegExp("^test"); | |
| re2 = new RegExp("^not there"); | |
| }; |
| curl -XDELETE localhost:9200/test | |
| curl -XPUT localhost:9200/test -d '{ | |
| "index.mapper.dynamic": false | |
| }' | |
| #{"ok":true,"acknowledged":true} | |
| curl -XPUT localhost:9200/test/test/1 -d '{"foo":"bar"}' | |
| #{"error":"TypeMissingException[[test] type[test] missing: trying to auto create mapping, but dynamic mapping is disabled]","status":404} |
| @(field:Field, min:Int=1)(f: (Field, Int) => Html) | |
| @{ | |
| (0 until math.max(if (field.indexes.isEmpty) 0 else field.indexes.max + 1, min)).map(i => f(field("[" + i + "]"),i)) | |
| } |
| case class Article(...); | |
| object Article { | |
| import DBUtil._ | |
| def delete(id: Long): Either[String, Boolean] = { | |
| withTransaction { implicit connection => | |
| SQL("DELETE FROM comments WHERE article_id = {id}").on("id" -> id).executeUpdate() | |
| SQL("DELETE FROM appusers WHERE id = {id}").on("id" -> id).executeUpdate( ) | |
| Right(true) |