http://www.siemens-greenplus.com/2014ssip/
此漏洞已回報。
Facebook 登入竟然直接寫在前端,登入後把資料寫在 hidden 的 input 欄位,按下投票就把 hidden input 的 value 丟給後端直接建立投票資料 Orz。
| <Files ~ "(^\.git|.swp$)"> | |
| Order allow,deny | |
| Deny from all | |
| Satisfy all | |
| </Files> |
http://www.siemens-greenplus.com/2014ssip/
此漏洞已回報。
Facebook 登入竟然直接寫在前端,登入後把資料寫在 hidden 的 input 欄位,按下投票就把 hidden input 的 value 丟給後端直接建立投票資料 Orz。
| brew install https://raw.github.com/cbguder/homebrew/53ea33bab5372ea74117ace8c44aa7ea988e93c2/Library/Formula/pngout.rb |
| # EditorConfig helps developers define and maintain consistent | |
| # coding styles between different editors and IDEs | |
| # http://EditorConfig.org | |
| # top-most EditorConfig file | |
| root = true | |
| # Unix-style newlines with a newline ending every file | |
| [*] | |
| charset = utf-8 |
| // ----- z-index ----- // | |
| @mixin z-index($element, $elements: $zIndex-elements, $base: 10) { | |
| $index: index($elements, $element); | |
| @if $index == false { | |
| @warn "There is no item "#{$element}" in the z-index list, please choose one of: #{$elements}'"; | |
| } @else { | |
| z-index: index($elements, $element) + $base; | |
| } | |
| } |
In vim, press CtrlZ and Enter on the end of line 12.
| /* | |
| * Usage exapmle: | |
| * 'b10132023@mail.ntust.edu.tw'.keyMatch('^(?<student_id>(?<identity_id>[bmd])(?<admission_year>\\d*)(?<admission_department_id>\\d{3})\\d{2})@mail\\.ntust\\.edu\\.tw$') | |
| * | |
| * The \ must be replaced as \\ in regex string. | |
| */ | |
| String.prototype.keyMatch = function (re, flags) { | |
| re = re.replace(/\(\?</gm, '(?P<'); |
| ActiveAdmin.register_page "Preference" do | |
| menu priority: 2 | |
| content do | |
| form :action => admin_preference_update_path, :method => :post do |f| | |
| f.input :name => 'authenticity_token', :type => :hidden, :value => form_authenticity_token.to_s | |
| panel "Preference" do | |
| fieldset do | |
| ol do | |
| li do |
| #!/bin/bash | |
| echo "Copying assets from $1 to $2 ..." | |
| find "$1/app/assets/javascripts" -mindepth 1 -maxdepth 1 ! -name "pages" ! -name "application.js" -exec cp -r {} "$2/app/assets/javascripts/" \; | |
| find "$1/app/assets/stylesheets" -mindepth 1 -maxdepth 1 ! -name "pages" ! -name "application.css.scss" ! -name "_settings.scss" ! -name "_settings.scss.erb" -exec cp -r {} "$2/app/assets/stylesheets/" \; | |
| cp -r "$1/app/assets/images/core" "$2/app/assets/images/" | |
| cp -r "$1/app/views/layouts" "$2/app/views/" | |
| cp -r "$1/app/views/partials" "$2/app/views/" |