yopass 2.2.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.gemspec +4 -4
  3. data/Dockerfile +9 -14
  4. data/Gemfile +2 -1
  5. data/Gemfile.lock +3 -2
  6. data/README.md +41 -17
  7. data/lib/public/create-secret.html +32 -0
  8. data/lib/public/css/bootstrap.min.css +5 -0
  9. data/lib/public/display-secret.html +34 -0
  10. data/lib/public/fonts/glyphicons-halflings-regular.eot +0 -0
  11. data/lib/public/fonts/glyphicons-halflings-regular.svg +288 -0
  12. data/lib/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  13. data/lib/public/fonts/glyphicons-halflings-regular.woff +0 -0
  14. data/lib/public/fonts/glyphicons-halflings-regular.woff2 +0 -0
  15. data/lib/public/index.html +49 -0
  16. data/lib/public/js/angular-route.min.js +15 -0
  17. data/lib/public/js/angular.js +250 -0
  18. data/lib/public/js/app.js +65 -0
  19. data/lib/yopass.rb +75 -80
  20. data/spec/yopass_spec.rb +22 -15
  21. metadata +25 -52
  22. data/CHANGELOG.md +0 -39
  23. data/Procfile +0 -1
  24. data/conf/config.ru +0 -3
  25. data/conf/yopass.yaml +0 -10
  26. data/lib/static/flash/clippy.swf +0 -0
  27. data/lib/static/js/jquery.address.js +0 -598
  28. data/lib/static/js/jquery.js +0 -8829
  29. data/lib/static/packaged/css/font.css +0 -36
  30. data/lib/static/packaged/css/semantic.css +0 -17804
  31. data/lib/static/packaged/css/semantic.min.css +0 -14
  32. data/lib/static/packaged/fonts/basic.icons.eot +0 -0
  33. data/lib/static/packaged/fonts/basic.icons.svg +0 -450
  34. data/lib/static/packaged/fonts/basic.icons.ttf +0 -0
  35. data/lib/static/packaged/fonts/basic.icons.woff +0 -0
  36. data/lib/static/packaged/fonts/icons.eot +0 -0
  37. data/lib/static/packaged/fonts/icons.otf +0 -0
  38. data/lib/static/packaged/fonts/icons.svg +0 -399
  39. data/lib/static/packaged/fonts/icons.ttf +0 -0
  40. data/lib/static/packaged/fonts/icons.woff +0 -0
  41. data/lib/static/packaged/fonts/sans/OpenSans-Bold.ttf +0 -0
  42. data/lib/static/packaged/fonts/sans/OpenSans-Light.ttf +0 -0
  43. data/lib/static/packaged/fonts/sans/OpenSans.ttf +0 -0
  44. data/lib/static/packaged/fonts/sans/OpenSansLight-Italic.ttf +0 -0
  45. data/lib/static/packaged/fonts/sans/SourceSansPro-Bold.ttf +0 -0
  46. data/lib/static/packaged/fonts/sans/SourceSansPro-Regular.ttf +0 -0
  47. data/lib/static/packaged/images/loader-large-inverted.gif +0 -0
  48. data/lib/static/packaged/images/loader-large.gif +0 -0
  49. data/lib/static/packaged/images/loader-medium-inverted.gif +0 -0
  50. data/lib/static/packaged/images/loader-medium.gif +0 -0
  51. data/lib/static/packaged/images/loader-mini-inverted.gif +0 -0
  52. data/lib/static/packaged/images/loader-mini.gif +0 -0
  53. data/lib/static/packaged/images/loader-small-inverted.gif +0 -0
  54. data/lib/static/packaged/images/loader-small.gif +0 -0
  55. data/lib/static/packaged/javascript/semantic.js +0 -11944
  56. data/lib/static/packaged/javascript/semantic.min.js +0 -16
  57. data/lib/static/yopass.css +0 -23
  58. data/lib/static/yopass.js +0 -23
  59. data/lib/views/404.erb +0 -43
  60. data/lib/views/footer.erb +0 -9
  61. data/lib/views/get_secret.erb +0 -31
  62. data/lib/views/header.erb +0 -27
  63. data/lib/views/index.erb +0 -117
  64. data/lib/views/secret_url.erb +0 -87
  65. data/yopass.god +0 -11
data/lib/views/index.erb DELETED
@@ -1,117 +0,0 @@
1
- <%= erb :header %>
2
-
3
- <div class="ui form segment">
4
- <% if !error.nil? %>
5
- <div class="ui red message"><%=error%></div>
6
- <% end %>
7
- <div class="ui error message"></div>
8
- <p>Submit your secret and receive a one time view url</p>
9
- <form role="form" method="post">
10
- <div class="ui form">
11
- <div class="field">
12
- <label>Your Secret</label>
13
- <textarea id="secret" name="secret"></textarea>
14
- </div>
15
-
16
- <div class="grouped inline fields">
17
- <label>Self destruct after</label>
18
- <div class="field">
19
- <div class="ui radio checkbox">
20
- <input type="radio" name="lifetime" value="1w" checked="checked">
21
- <label>1 Week</label>
22
- </div>
23
- </div>
24
- <div class="field">
25
- <div class="ui radio checkbox">
26
- <input type="radio" name="lifetime" value="1h">
27
- <label>1 Day</label>
28
- </div>
29
- </div>
30
- <div class="field">
31
- <div class="ui radio checkbox">
32
- <input type="radio" name="lifetime" value="1h">
33
- <label>1 Hour</label>
34
- </div>
35
- </div>
36
- <% if send_sms %>
37
- <div class="field">
38
- <label>Send decryption key over SMS (optional)</label>
39
- <div class="ui left labeled icon input">
40
- <input type="text" name="mobile_number" placeholder="Mobile number eg 4670222123">
41
- <i class="mobile icon"></i>
42
- </div>
43
- </div>
44
- <% end %>
45
- </div>
46
- <button type="submit" class="ui blue submit button">Store Secret</button>
47
- </form>
48
- </div>
49
-
50
- <div class="ui horizontal icon divider">
51
- <i class="settings icon"></i>
52
- </div>
53
-
54
- <div class="ui grid">
55
- <div class="row">
56
- <div class="five wide left column">
57
- <h2 class="ui header">
58
- <i class="lock icon"></i>
59
- <div class="content">AES-256 encryption
60
- <div class="sub header">Your secret is encrypted and no records of the decryption key is stored anywhere</div>
61
- </div>
62
- </h2>
63
- </div>
64
- <div class="five wide left column">
65
- <h2 class="ui header">
66
- <i class="time icon"></i>
67
- <div class="content">Self destruction
68
- <div class="sub header">All secrets will self destruct after X hours</div>
69
- </div>
70
- </h2>
71
- </div>
72
- <div class="five wide left column">
73
- <h2 class="ui header">
74
- <i class="remove circle icon"></i>
75
- <div class="content">Not stored on disk
76
- <div class="sub header">Your secret is stored in memory to increase security</div>
77
- </div>
78
- </h2>
79
- </div>
80
- </div>
81
-
82
- <div class="row">
83
- <div class="five wide left column">
84
- <h2 class="ui header">
85
- <i class="attention icon"></i>
86
- <div class="content">No caching
87
- <div class="sub header">Caching headers are disabled. Pressing the backwards arrow in browser won't work</div>
88
- </div>
89
- </h2>
90
- </div>
91
- <div class="five wide left column">
92
- <h2 class="ui header">
93
- <i class="unhide icon"></i>
94
- <div class="content">Visible once
95
- <div class="sub header">Your secret is only visible once to make sure it's never been seen by anyone except the receiver. The secret is deleted automatically when viewed</div>
96
- </div>
97
- </h2>
98
- </div>
99
- <div class="five wide left column">
100
- <h2 class="ui header">
101
- <i class="github icon"></i>
102
- <div class="content">Open Source
103
- <div class="sub header">This website is open source meaning you can submit feedback and patches to improve the project</div>
104
- </div>
105
- </h2>
106
- </div>
107
- <div class="five wide left column">
108
- <h2 class="ui header">
109
- <i class="ban circle icon"></i>
110
- <div class="content">Rate Limiting
111
- <div class="sub header">Secret will be deleted after three failed decryption attempts</div>
112
- </div>
113
- </h2>
114
- </div>
115
- </div>
116
- </div>
117
- <%= erb :footer %>
@@ -1,87 +0,0 @@
1
- <%= erb :header %>
2
- <h2>URL for your secret</h2>
3
- Your secret can only be viewed ONCE, do not open the URL yourself
4
- <table class="ui basic table">
5
- <tbody>
6
- <tr>
7
- <td>URL with decryption key</td>
8
- <td><%=full_url%></td>
9
- <td>
10
- <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
11
- width="110"
12
- height="14"
13
- id="clippy" >
14
- <param name="movie" value="/flash/clippy.swf"/>
15
- <param name="allowScriptAccess" value="always" />
16
- <param name="quality" value="high" />
17
- <param name="scale" value="noscale" />
18
- <param NAME="FlashVars" value="text=<%=full_url%>">
19
- <embed src="/flash/clippy.swf"
20
- width="110"
21
- height="15"
22
- name="clippy"
23
- quality="high"
24
- allowScriptAccess="always"
25
- type="application/x-shockwave-flash"
26
- pluginspage="http://www.macromedia.com/go/getflashplayer"
27
- FlashVars="text=<%=full_url%>"/>
28
- </object>
29
- </td>
30
- </tr>
31
- <tr>
32
- <td>URL without decryption key</td>
33
- <td><%=short_url%></td>
34
- <td>
35
- <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
36
- width="110"
37
- height="14"
38
- id="clippy" >
39
- <param name="movie" value="/flash/clippy.swf"/>
40
- <param name="allowScriptAccess" value="always" />
41
- <param name="quality" value="high" />
42
- <param name="scale" value="noscale" />
43
- <param NAME="FlashVars" value="text=<%=short_url%>">
44
- <embed src="/flash/clippy.swf"
45
- width="110"
46
- height="15"
47
- name="clippy"
48
- quality="high"
49
- allowScriptAccess="always"
50
- type="application/x-shockwave-flash"
51
- pluginspage="http://www.macromedia.com/go/getflashplayer"
52
- FlashVars="text=<%=short_url%>"/>
53
- </object>
54
- </td>
55
- </tr>
56
- <tr>
57
- <td>Decryption key</td>
58
- <td><%=decryption_key%></td>
59
- <td>
60
- <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
61
- width="110"
62
- height="14"
63
- id="clippy" >
64
- <param name="movie" value="/flash/clippy.swf"/>
65
- <param name="allowScriptAccess" value="always" />
66
- <param name="quality" value="high" />
67
- <param name="scale" value="noscale" />
68
- <param NAME="FlashVars" value="text=<%=decryption_key%>">
69
- <embed src="/flash/clippy.swf"
70
- width="110"
71
- height="15"
72
- name="clippy"
73
- quality="high"
74
- allowScriptAccess="always"
75
- type="application/x-shockwave-flash"
76
- pluginspage="http://www.macromedia.com/go/getflashplayer"
77
- FlashVars="text=<%=decryption_key%>"/>
78
- </object>
79
- </td>
80
- </tr>
81
- </tbody>
82
- </table>
83
-
84
- <% if key_sent_to_mobile %>
85
- <p>The decryption key is sent to the receiver via SMS, don't forget to provide the URL via another channel</p>
86
- <% end %>
87
- <%= erb :footer %>
data/yopass.god DELETED
@@ -1,11 +0,0 @@
1
- God.watch do |w|
2
- w.name = "yopass"
3
- w.start = "foreman start -d /yopass"
4
- w.keepalive
5
- end
6
-
7
- God.watch do |w|
8
- w.name = "memcached"
9
- w.start = "memcached -u root"
10
- w.keepalive
11
- end