Permalink
Browse files

add new web backend

  • Loading branch information...
SSilence committed Aug 9, 2014
1 parent 169c2fe commit 20b5143a6f3e934de811edc0a5792cf7fa602403
Showing with 48,477 additions and 49 deletions.
  1. +1 −0 README.md
  2. +6 −3 app/default.ini
  3. +2 −1 app/index.html
  4. +3 −2 app/sum-backend-client.js
  5. +1 −7 app/sum-backend-command.js
  6. +54 −22 app/sum-backend-helpers.js
  7. +1 −1 app/sum-backend-server.js
  8. +2 −2 app/{sum-backend-userlist.js → sum-backend-userlist-file.js}
  9. +308 −0 app/sum-backend-userlist-web.js
  10. +5 −1 app/sum-backend.js
  11. +11 −7 backend.php
  12. +2 −1 gruntfile.js
  13. +2 −0 node_modules/request/.npmignore
  14. +12 −0 node_modules/request/.travis.yml
  15. +954 −0 node_modules/request/CHANGELOG.md
  16. +55 −0 node_modules/request/LICENSE
  17. +421 −0 node_modules/request/README.md
  18. +166 −0 node_modules/request/index.js
  19. +40 −0 node_modules/request/lib/cookies.js
  20. +8 −0 node_modules/request/lib/copy.js
  21. +7 −0 node_modules/request/lib/debug.js
  22. +34 −0 node_modules/request/lib/getSafe.js
  23. +5 −0 node_modules/request/lib/optional.js
  24. +55 −0 node_modules/request/node_modules/aws-sign2/LICENSE
  25. +4 −0 node_modules/request/node_modules/aws-sign2/README.md
  26. +202 −0 node_modules/request/node_modules/aws-sign2/index.js
  27. +47 −0 node_modules/request/node_modules/aws-sign2/package.json
  28. +55 −0 node_modules/request/node_modules/forever-agent/LICENSE
  29. +4 −0 node_modules/request/node_modules/forever-agent/README.md
  30. +119 −0 node_modules/request/node_modules/forever-agent/index.js
  31. +46 −0 node_modules/request/node_modules/forever-agent/package.json
  32. +19 −0 node_modules/request/node_modules/form-data/License
  33. +175 −0 node_modules/request/node_modules/form-data/Readme.md
  34. +351 −0 node_modules/request/node_modules/form-data/lib/form_data.js
  35. +3 −0 node_modules/request/node_modules/form-data/node_modules/async/.travis.yml
  36. +19 −0 node_modules/request/node_modules/form-data/node_modules/async/LICENSE
  37. +1,646 −0 node_modules/request/node_modules/form-data/node_modules/async/README.md
  38. +11 −0 node_modules/request/node_modules/form-data/node_modules/async/component.json
  39. +1,123 −0 node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
  40. +60 −0 node_modules/request/node_modules/form-data/node_modules/async/package.json
  41. +19 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/License
  42. +132 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md
  43. +186 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js
  44. +2 −0 ...equest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/.gitignore
  45. +19 −0 ...s/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/License
  46. +7 −0 .../request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Makefile
  47. +154 −0 ...request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/Readme.md
  48. +99 −0 ..._modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/lib/delayed_stream.js
  49. +42 −0 ...uest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
  50. +6 −0 ...st/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/common.js
  51. +38 −0 ..._modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-http-upload.js
  52. +21 −0 ...es/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-auto-pause.js
  53. +14 −0 ...modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream-pause.js
  54. +48 −0 .../node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-delayed-stream.js
  55. +15 −0 ...modules/combined-stream/node_modules/delayed-stream/test/integration/test-handle-source-errors.js
  56. +18 −0 ...a/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-max-data-size.js
  57. +13 −0 ...ta/node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-pipe-resumes.js
  58. +13 −0 .../node_modules/combined-stream/node_modules/delayed-stream/test/integration/test-proxy-readable.js
  59. +7 −0 ...quest/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/test/run.js
  60. +61 −0 node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
  61. +19 −0 node_modules/request/node_modules/form-data/node_modules/mime/LICENSE
  62. +66 −0 node_modules/request/node_modules/form-data/node_modules/mime/README.md
  63. +114 −0 node_modules/request/node_modules/form-data/node_modules/mime/mime.js
  64. +59 −0 node_modules/request/node_modules/form-data/node_modules/mime/package.json
  65. +84 −0 node_modules/request/node_modules/form-data/node_modules/mime/test.js
  66. +1,588 −0 node_modules/request/node_modules/form-data/node_modules/mime/types/mime.types
  67. +77 −0 node_modules/request/node_modules/form-data/node_modules/mime/types/node.types
  68. +80 −0 node_modules/request/node_modules/form-data/package.json
  69. +18 −0 node_modules/request/node_modules/hawk/.npmignore
  70. +5 −0 node_modules/request/node_modules/hawk/.travis.yml
  71. +24 −0 node_modules/request/node_modules/hawk/LICENSE
  72. +10 −0 node_modules/request/node_modules/hawk/Makefile
  73. +625 −0 node_modules/request/node_modules/hawk/README.md
  74. +78 −0 node_modules/request/node_modules/hawk/example/usage.js
  75. BIN node_modules/request/node_modules/hawk/images/hawk.png
  76. BIN node_modules/request/node_modules/hawk/images/logo.png
  77. +1 −0 node_modules/request/node_modules/hawk/index.js
  78. +507 −0 node_modules/request/node_modules/hawk/lib/browser.js
  79. +371 −0 node_modules/request/node_modules/hawk/lib/client.js
  80. +118 −0 node_modules/request/node_modules/hawk/lib/crypto.js
  81. +15 −0 node_modules/request/node_modules/hawk/lib/index.js
  82. +523 −0 node_modules/request/node_modules/hawk/lib/server.js
  83. +183 −0 node_modules/request/node_modules/hawk/lib/utils.js
  84. +18 −0 node_modules/request/node_modules/hawk/node_modules/boom/.npmignore
  85. +5 −0 node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml
  86. +24 −0 node_modules/request/node_modules/hawk/node_modules/boom/LICENSE
  87. +11 −0 node_modules/request/node_modules/hawk/node_modules/boom/Makefile
  88. +6 −0 node_modules/request/node_modules/hawk/node_modules/boom/README.md
  89. BIN node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png
  90. +1 −0 node_modules/request/node_modules/hawk/node_modules/boom/index.js
  91. +207 −0 node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js
  92. +64 −0 node_modules/request/node_modules/hawk/node_modules/boom/package.json
  93. +245 −0 node_modules/request/node_modules/hawk/node_modules/boom/test/index.js
  94. +18 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore
  95. +5 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml
  96. +24 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE
  97. +11 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile
  98. +6 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md
  99. +1 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js
  100. +68 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js
  101. +65 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json
  102. +101 −0 node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js
  103. +18 −0 node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore
  104. +5 −0 node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml
  105. +33 −0 node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE
  106. +10 −0 node_modules/request/node_modules/hawk/node_modules/hoek/Makefile
  107. +436 −0 node_modules/request/node_modules/hawk/node_modules/hoek/README.md
  108. BIN node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png
  109. +1 −0 node_modules/request/node_modules/hawk/node_modules/hoek/index.js
  110. +132 −0 node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js
  111. +585 −0 node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js
  112. +70 −0 node_modules/request/node_modules/hawk/node_modules/hoek/package.json
  113. +86 −0 node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js
  114. +1,078 −0 node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js
  115. +1 −0 node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js
  116. +1 −0 node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js
  117. +1 −0 node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js
  118. +18 −0 node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore
  119. +5 −0 node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml
  120. +24 −0 node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE
  121. +11 −0 node_modules/request/node_modules/hawk/node_modules/sntp/Makefile
  122. +68 −0 node_modules/request/node_modules/hawk/node_modules/sntp/README.md
  123. +16 −0 node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js
  124. +25 −0 node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js
  125. +1 −0 node_modules/request/node_modules/hawk/node_modules/sntp/index.js
  126. +409 −0 node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js
  127. +65 −0 node_modules/request/node_modules/hawk/node_modules/sntp/package.json
  128. +359 −0 node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js
  129. +68 −0 node_modules/request/node_modules/hawk/package.json
  130. +817 −0 node_modules/request/node_modules/hawk/test/browser.js
  131. +206 −0 node_modules/request/node_modules/hawk/test/client.js
  132. +86 −0 node_modules/request/node_modules/hawk/test/crypto.js
  133. +316 −0 node_modules/request/node_modules/hawk/test/index.js
  134. +246 −0 node_modules/request/node_modules/hawk/test/message.js
  135. +98 −0 node_modules/request/node_modules/hawk/test/readme.js
  136. +686 −0 node_modules/request/node_modules/hawk/test/server.js
  137. +456 −0 node_modules/request/node_modules/hawk/test/uri.js
  138. +120 −0 node_modules/request/node_modules/hawk/test/utils.js
  139. +6 −0 node_modules/request/node_modules/http-signature/.dir-locals.el
  140. +7 −0 node_modules/request/node_modules/http-signature/.npmignore
  141. +18 −0 node_modules/request/node_modules/http-signature/LICENSE
  142. +75 −0 node_modules/request/node_modules/http-signature/README.md
  143. +296 −0 node_modules/request/node_modules/http-signature/http_signing.md
  144. +25 −0 node_modules/request/node_modules/http-signature/lib/index.js
  145. +304 −0 node_modules/request/node_modules/http-signature/lib/parser.js
  146. +179 −0 node_modules/request/node_modules/http-signature/lib/signer.js
  147. +249 −0 node_modules/request/node_modules/http-signature/lib/util.js
  148. +42 −0 node_modules/request/node_modules/http-signature/lib/verify.js
  149. +2 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/.npmignore
  150. +19 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/LICENSE
  151. +50 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/README.md
  152. +13 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/errors.js
  153. +27 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/index.js
  154. +267 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/reader.js
  155. +36 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/types.js
  156. +317 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/ber/writer.js
  157. +20 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/lib/index.js
  158. +63 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
  159. +172 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/reader.test.js
  160. +296 −0 node_modules/request/node_modules/http-signature/node_modules/asn1/tst/ber/writer.test.js
  161. +126 −0 node_modules/request/node_modules/http-signature/node_modules/assert-plus/README.md
  162. +196 −0 node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js
  163. +38 −0 node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
  164. +71 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG
  165. +24 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/LICENSE
  166. +82 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/README
  167. +298 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/README.old
  168. +245 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/ctf.js
  169. +1,485 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/ctio.js
  170. +944 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/ctype.js
  171. +241 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/man/man3ctype/ctio.3ctype
  172. +35 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
  173. +129 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsl.conf
  174. +839 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tools/jsstyle
  175. +13 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json
  176. +13 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json
  177. +104 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json
  178. +19 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json
  179. +39 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js
  180. +14 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js
  181. +14 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js
  182. +17 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js
  183. +18 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js
  184. +15 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js
  185. +14 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json
  186. +767 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js
  187. +753 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js
  188. +638 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js
  189. +101 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js
  190. +53 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js
  191. +92 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js
  192. +451 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js
  193. +81 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js
  194. +95 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js
  195. +156 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js
  196. +50 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js
  197. +44 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js
  198. +42 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js
  199. +45 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js
  200. +28 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js
  201. +128 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js
  202. +28 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js
  203. +31 −0 node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js
  204. +54 −0 node_modules/request/node_modules/http-signature/package.json
  205. +27 −0 node_modules/request/node_modules/json-stringify-safe/LICENSE
  206. +49 −0 node_modules/request/node_modules/json-stringify-safe/README.md
  207. +51 −0 node_modules/request/node_modules/json-stringify-safe/package.json
  208. +39 −0 node_modules/request/node_modules/json-stringify-safe/stringify.js
  209. +128 −0 node_modules/request/node_modules/json-stringify-safe/test.js
  210. +14 −0 node_modules/request/node_modules/mime-types/.npmignore
  211. +12 −0 node_modules/request/node_modules/mime-types/.travis.yml
  212. +22 −0 node_modules/request/node_modules/mime-types/LICENSE
  213. +9 −0 node_modules/request/node_modules/mime-types/Makefile
  214. +101 −0 node_modules/request/node_modules/mime-types/README.md
  215. +17 −0 node_modules/request/node_modules/mime-types/SOURCES.md
  216. +16 −0 node_modules/request/node_modules/mime-types/component.json
  217. +27 −0 node_modules/request/node_modules/mime-types/lib/custom.json
  218. +75 −0 node_modules/request/node_modules/mime-types/lib/index.js
  219. +3,317 −0 node_modules/request/node_modules/mime-types/lib/mime.json
  220. +55 −0 node_modules/request/node_modules/mime-types/lib/node.json
  221. +68 −0 node_modules/request/node_modules/mime-types/package.json
  222. +2 −0 node_modules/request/node_modules/node-uuid/.npmignore
  223. +2 −0 node_modules/request/node_modules/node-uuid/LICENSE.md
  224. +207 −0 node_modules/request/node_modules/node-uuid/README.md
  225. +53 −0 node_modules/request/node_modules/node-uuid/benchmark/README.md
  226. +174 −0 node_modules/request/node_modules/node-uuid/benchmark/bench.gnu
  227. +34 −0 node_modules/request/node_modules/node-uuid/benchmark/bench.sh
  228. +34 −0 node_modules/request/node_modules/node-uuid/benchmark/benchmark-native.c
  229. +84 −0 node_modules/request/node_modules/node-uuid/benchmark/benchmark.js
  230. +18 −0 node_modules/request/node_modules/node-uuid/component.json
  231. +54 −0 node_modules/request/node_modules/node-uuid/package.json
  232. +63 −0 node_modules/request/node_modules/node-uuid/test/compare_v1.js
  233. +17 −0 node_modules/request/node_modules/node-uuid/test/test.html
  234. +228 −0 node_modules/request/node_modules/node-uuid/test/test.js
  235. +245 −0 node_modules/request/node_modules/node-uuid/uuid.js
  236. +55 −0 node_modules/request/node_modules/oauth-sign/LICENSE
  237. +4 −0 node_modules/request/node_modules/oauth-sign/README.md
  238. +43 −0 node_modules/request/node_modules/oauth-sign/index.js
  239. +49 −0 node_modules/request/node_modules/oauth-sign/package.json
  240. +49 −0 node_modules/request/node_modules/oauth-sign/test.js
  241. +1 −0 node_modules/request/node_modules/qs/.jshintignore
  242. +10 −0 node_modules/request/node_modules/qs/.jshintrc
  243. +18 −0 node_modules/request/node_modules/qs/.npmignore
  244. +4 −0 node_modules/request/node_modules/qs/.travis.yml
  245. +28 −0 node_modules/request/node_modules/qs/LICENSE
  246. +8 −0 node_modules/request/node_modules/qs/Makefile
  247. +120 −0 node_modules/request/node_modules/qs/README.md
  248. +1 −0 node_modules/request/node_modules/qs/index.js
  249. +15 −0 node_modules/request/node_modules/qs/lib/index.js
  250. +151 −0 node_modules/request/node_modules/qs/lib/parse.js
  251. +52 −0 node_modules/request/node_modules/qs/lib/stringify.js
  252. +131 −0 node_modules/request/node_modules/qs/lib/utils.js
  253. +60 −0 node_modules/request/node_modules/qs/package.json
  254. +236 −0 node_modules/request/node_modules/qs/test/parse.js
  255. +123 −0 node_modules/request/node_modules/qs/test/stringify.js
  256. +15 −0 node_modules/request/node_modules/stringstream/.npmignore
  257. +4 −0 node_modules/request/node_modules/stringstream/.travis.yml
  258. +4 −0 node_modules/request/node_modules/stringstream/LICENSE.txt
  259. +38 −0 node_modules/request/node_modules/stringstream/README.md
  260. +27 −0 node_modules/request/node_modules/stringstream/example.js
  261. +48 −0 node_modules/request/node_modules/stringstream/package.json
  262. +102 −0 node_modules/request/node_modules/stringstream/stringstream.js
  263. +70 −0 node_modules/request/node_modules/tough-cookie/.jshintrc
  264. +3 −0 node_modules/request/node_modules/tough-cookie/.npmignore
  265. +8 −0 node_modules/request/node_modules/tough-cookie/.travis.yml
  266. +78 −0 node_modules/request/node_modules/tough-cookie/LICENSE
  267. +412 −0 node_modules/request/node_modules/tough-cookie/README.md
  268. +239 −0 node_modules/request/node_modules/tough-cookie/generate-pubsuffix.js
  269. +1,107 −0 node_modules/request/node_modules/tough-cookie/lib/cookie.js
  270. +123 −0 node_modules/request/node_modules/tough-cookie/lib/memstore.js
  271. +69 −0 node_modules/request/node_modules/tough-cookie/lib/pubsuffix.js
  272. +37 −0 node_modules/request/node_modules/tough-cookie/lib/store.js
  273. +20 −0 node_modules/request/node_modules/tough-cookie/node_modules/punycode/LICENSE-MIT.txt
  274. +176 −0 node_modules/request/node_modules/tough-cookie/node_modules/punycode/README.md
  275. +86 −0 node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json
  276. +528 −0 node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js
  277. +67 −0 node_modules/request/node_modules/tough-cookie/package.json
  278. +5,229 −0 node_modules/request/node_modules/tough-cookie/public-suffix.txt
  279. +1,625 −0 node_modules/request/node_modules/tough-cookie/test.js
  280. +5 −0 node_modules/request/node_modules/tunnel-agent/.jshintrc
  281. +55 −0 node_modules/request/node_modules/tunnel-agent/LICENSE
  282. +4 −0 node_modules/request/node_modules/tunnel-agent/README.md
  283. +236 −0 node_modules/request/node_modules/tunnel-agent/index.js
  284. +46 −0 node_modules/request/node_modules/tunnel-agent/package.json
  285. +76 −0 node_modules/request/package.json
  286. +1,428 −0 node_modules/request/request.js
  287. +2 −1 package.json
  288. +2 −1 test/run.html
View
@@ -145,6 +145,7 @@ Special thanks to the great programmers of this libraries which will be used in
* grunt coverage template: https://github.com/maenu/grunt-template-jasmine-istanbul
* jasmine unit test: http://jasmine.github.io/
* wait for images: https://github.com/alexanderdickson/waitForImages
* request: https://github.com/mikeal/request
[1]: http://nodejs.org/
[2]: http://www.jrsoftware.org/isinfo.php
View
@@ -1,8 +1,8 @@
; backend: use file or web for user management
backend = file
; use file or web for user management
userlist = file
; url for backend file
web_url =
web_url = http://localhost/sum/backend.php
; web backend aes key
web_aes_key = secret
@@ -16,6 +16,9 @@ user_file_extended = c:/tmp/?
; path of lock file
lock_file = c:/tmp/userfile.lock
; initialization vector for aes encryption
iv = fio78JKHaids
; path of version file
version_file = c:/tmp/version
View
@@ -142,7 +142,8 @@ <h1>R&auml;ume <span id="rooms-add" class="ion-plus-round"></span></h1>
<script src="sum-init.js"></script>
<script src="sum-emoticons.js"></script>
<script src="sum-backend.js"></script>
<script src="sum-backend-userlist.js"></script>
<script src="sum-backend-userlist-file.js"></script>
<script src="sum-backend-userlist-web.js"></script>
<script src="sum-backend-helpers.js"></script>
<script src="sum-backend-client.js"></script>
<script src="sum-backend-server.js"></script>
@@ -1,5 +1,6 @@
if (typeof base64 == 'undefined') base64 = require('base64-stream');
if (typeof fs == 'undefined') fs = require('fs');
if (typeof http == 'undefined') http = require('http');
/**
* client for sending encrypted chat messages and status updates
@@ -30,7 +31,7 @@ define('sum-backend-client', Class.extend({
*/
send: function(receiver, message, success, error) {
// encrypt message
var encMessage = this.backendHelpers.encrypt(new NodeRSA(receiver.key), message);
var encMessage = this.backendHelpers.rsaencrypt(new NodeRSA(receiver.key), message);
// send message
var request = http.request({
@@ -39,7 +40,7 @@ define('sum-backend-client', Class.extend({
path: '/',
method: 'POST',
headers: {
'Content-Txype': 'application/json',
'Content-Type': 'application/json',
'Content-Length': encMessage.length
}
}, function(res) {
@@ -20,12 +20,6 @@ define('sum-backend-command', Class.extend({
backend: injected('sum-backend'),
/**
* backends userlist updater
*/
backendUserlist: injected('sum-backend-userlist'),
/**
* execute command.
* @param (string) command given by message input
@@ -97,7 +91,7 @@ define('sum-backend-command', Class.extend({
// /reload
} else if(command == '/reload') {
this.backendUserlist.userlistUpdateTimer();
this.backend.backendUserlist.userlistUpdateTimer();
this.backend.renderSystemMessage('userlist reload', conversation);
View
@@ -55,6 +55,60 @@ define('sum-backend-helpers', Class.extend({
},
/**
* decrypt with AES
* @return (string) decrypted text
* @param (string) cryptkey password
* @param (string) encryptdata encrypted data to decrypt
*/
aesdecrypt: function(cryptkey, encryptdata) {
cryptkey = crypto.createHash('sha256').update(cryptkey).digest();
encryptdata = new Buffer(encryptdata, 'base64').toString('binary');
var decipher = crypto.createDecipheriv('aes-256-cbc', cryptkey, config.iv);
var decoded = decipher.update(encryptdata, 'binary', 'utf8');
decoded += decipher.final('utf8');
return decoded;
},
/**
* encrypt with AES
* @return (string) clear text
* @param (string) cryptkey password
* @param (string) encryptdata cleartext to encrypt
*/
aesencrypt: function(cryptkey, cleardata) {
cryptkey = crypto.createHash('sha256').update(cryptkey).digest();
var encipher = crypto.createCipheriv('aes-256-cbc', cryptkey, config.iv);
var encryptdata = encipher.update(cleardata, 'utf8', 'binary');
encryptdata += encipher.final('binary');
encode_encryptdata = new Buffer(encryptdata, 'binary').toString('base64');
return encode_encryptdata;
},
/**
* encrypt with RSA
* @return encrypted string
* @param key (string) public key for encryption
* @param data (mixed) data for encryption
*/
rsaencrypt: function(key, data) {
return key.encrypt(data, 'base64');
},
/**
* decrypt with RSA
* @return (string) decrypted string
* @param key (string) public key for decryption
* @param data (mixed) data for decryption
*/
rsadecrypt: function(key, data) {
return key.decrypt(data).toString();
},
/**
* returns current ip
* @return (string or boolean) the ip of the current user
@@ -186,28 +240,6 @@ define('sum-backend-helpers', Class.extend({
},
/**
* encrypt with RSA
* @return encrypted string
* @param key (string) public key for encryption
* @param data (mixed) data for encryption
*/
encrypt: function(key, data) {
return key.encrypt(data, 'base64');
},
/**
* decrypt with RSA
* @return (string) decrypted string
* @param key (string) public key for decryption
* @param data (mixed) data for decryption
*/
decrypt: function(key, data) {
return key.decrypt(data).toString();
},
/**
* search user in userlist
* @return (object or boolean) user object or false if none was found
@@ -55,7 +55,7 @@ define('sum-backend-server', Class.extend({
// parse decrypted json
var req = {};
try {
var reqStr = that.backendHelpers.decrypt(that.backend.key, body);
var reqStr = that.backendHelpers.rsadecrypt(that.backend.key, body);
req = JSON.parse(reqStr);
} catch(e) {
that.backend.error('Ungueltige Nachricht erhalten (verschluesselung oder JSON konnte nicht verarbeitet werden)');
@@ -1,10 +1,10 @@
/**
* handels userlist file update
* handels userlist file update by using a file in shared file system
*
* @copyright Copyright (c) Tobias Zeising (http://www.aditu.de)
* @license GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
*/
define('sum-backend-userlist', Class.extend({
define('sum-backend-userlist-file', Class.extend({
/**
* backends
Oops, something went wrong.

0 comments on commit 20b5143

Please sign in to comment.