tdiary 5.6.0 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +61 -59
  4. data/doc/HOWTO-authenticate-in-rack.md +3 -3
  5. data/doc/HOWTO-make-theme.md +3 -3
  6. data/js/00default.js +22 -12
  7. data/js/caretposition.js +1 -0
  8. data/js/draft.js +228 -51
  9. data/js/image.js +126 -29
  10. data/js/preview.js +12 -50
  11. data/js/update.js +54 -0
  12. data/js/update_preview.js +79 -0
  13. data/lib/aws/pa_api.rb +7 -7
  14. data/lib/tdiary/admin.rb +66 -3
  15. data/lib/tdiary/cli.rb +14 -10
  16. data/lib/tdiary/core_ext.rb +46 -8
  17. data/lib/tdiary/dispatcher/update_main.rb +6 -0
  18. data/lib/tdiary/io/plugin_pstore.rb +2 -1
  19. data/lib/tdiary/plugin/00default.rb +3 -0
  20. data/lib/tdiary/rack/auth/basic.rb +72 -9
  21. data/lib/tdiary/tasks/auth.rake +2 -4
  22. data/lib/tdiary/tasks/release.rake +5 -4
  23. data/lib/tdiary/version.rb +1 -1
  24. data/lib/tdiary.rb +3 -0
  25. data/misc/plugin/amazon.rb +48 -11
  26. data/misc/plugin/amazon_rakuten.rb +79 -0
  27. data/misc/plugin/draft.rb +83 -0
  28. data/misc/plugin/en/image.rb +5 -0
  29. data/misc/plugin/en/makerss.rb +4 -0
  30. data/misc/plugin/en/preview.rb +0 -2
  31. data/misc/plugin/image.rb +19 -13
  32. data/misc/plugin/ja/makerss.rb +3 -0
  33. data/misc/plugin/ja/preview.rb +0 -2
  34. data/misc/plugin/makerss.rb +5 -4
  35. data/misc/plugin/my-sequel.rb +1 -0
  36. data/misc/plugin/preview.rb +0 -8
  37. data/theme/base.css +32 -2
  38. data/theme/conf.css +60 -0
  39. data/theme/default/default.css +33 -8
  40. data/vendor/bundle/ruby/3.4.0/cache/bcrypt-3.1.22.gem +0 -0
  41. data/vendor/bundle/ruby/3.4.0/cache/date-3.6.0.gem +0 -0
  42. data/vendor/bundle/ruby/3.4.0/cache/fastimage-2.4.3.gem +0 -0
  43. data/vendor/bundle/ruby/3.4.0/cache/net-imap-0.6.8.gem +0 -0
  44. data/vendor/bundle/ruby/3.4.0/cache/net-protocol-0.4.0.gem +0 -0
  45. data/vendor/bundle/ruby/3.4.0/cache/net-smtp-0.5.2.gem +0 -0
  46. data/vendor/bundle/ruby/3.4.0/cache/pstore-0.3.0.gem +0 -0
  47. data/vendor/bundle/ruby/3.4.0/cache/rack-3.2.8.gem +0 -0
  48. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/bcrypt-3.1.22/bcrypt_ext.so +0 -0
  49. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/bcrypt-3.1.22/gem_make.out +28 -0
  50. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/cgi-0.5.2/cgi/escape.so +0 -0
  51. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/cgi-0.5.2/gem_make.out +6 -6
  52. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.6.0/date_core.so +0 -0
  53. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.6.0/gem.build_complete +0 -0
  54. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.6.0/gem_make.out +26 -0
  55. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.6.0/mkmf.log +140 -0
  56. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/CHANGELOG +127 -0
  57. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/COPYING +28 -0
  58. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/README.md +192 -0
  59. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/jruby/bcrypt_jruby/BCrypt.java +926 -0
  60. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/Makefile +273 -0
  61. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/bcrypt_ext.c +125 -0
  62. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt.c +57 -0
  63. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt.h +24 -0
  64. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt_blowfish.c +903 -0
  65. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt_blowfish.h +27 -0
  66. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt_gensalt.c +124 -0
  67. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/crypt_gensalt.h +30 -0
  68. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/extconf.rb +22 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/ow-crypt.h +43 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/wrapper.c +554 -0
  71. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/ext/mri/x86.S +203 -0
  72. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/lib/bcrypt/engine.rb +134 -0
  73. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/lib/bcrypt/error.rb +22 -0
  74. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/lib/bcrypt/password.rb +106 -0
  75. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/lib/bcrypt.rb +16 -0
  76. data/vendor/bundle/ruby/3.4.0/gems/bcrypt-3.1.22/lib/bcrypt_ext.so +0 -0
  77. data/vendor/bundle/ruby/3.4.0/gems/cgi-0.5.2/ext/cgi/escape/Makefile +3 -3
  78. data/vendor/bundle/ruby/3.4.0/gems/cgi-0.5.2/lib/cgi/escape.so +0 -0
  79. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/Makefile +4 -4
  80. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_core.c +293 -77
  81. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_parse.c +14 -4
  82. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_strptime.c +13 -13
  83. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/extconf.rb +6 -0
  84. data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/lib/date.rb +1 -1
  85. data/vendor/bundle/ruby/3.4.0/gems/date-3.6.0/lib/date_core.so +0 -0
  86. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/avif.rb +1 -0
  87. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/fiber_stream.rb +6 -1
  88. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/heic.rb +1 -0
  89. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/iso_bmff.rb +15 -5
  90. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/jxl.rb +1 -0
  91. data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/version.rb +1 -1
  92. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/Gemfile +3 -3
  93. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.8/README.md +103 -0
  94. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.8/Rakefile +74 -0
  95. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/command_data.rb +13 -10
  96. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/config/attr_accessors.rb +2 -2
  97. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/config/attr_type_coercion.rb +14 -26
  98. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/config.rb +63 -3
  99. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/esearch_result.rb +2 -2
  100. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/fetch_data.rb +5 -5
  101. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/response_data.rb +79 -79
  102. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/response_parser/parser_utils.rb +1 -1
  103. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/response_parser.rb +2 -1
  104. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/client_adapter.rb +6 -6
  105. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/search_result.rb +4 -6
  106. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sequence_set.rb +413 -52
  107. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.8/lib/net/imap/utils.rb +49 -0
  108. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap.rb +195 -46
  109. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/rakelib/rdoc.rake +24 -0
  110. data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.3.0 → net-protocol-0.4.0}/lib/net/protocol.rb +38 -23
  111. data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp.rb +5 -8
  112. data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/lib/pstore.rb +52 -31
  113. data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/pstore.gemspec +1 -0
  114. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/CHANGELOG.md +34 -0
  115. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/multipart/parser.rb +7 -2
  116. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/multipart/uploaded_file.rb +1 -0
  117. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/request.rb +5 -2
  118. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/static.rb +1 -1
  119. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/version.rb +1 -1
  120. data/vendor/bundle/ruby/3.4.0/specifications/bcrypt-3.1.22.gemspec +33 -0
  121. data/vendor/bundle/ruby/3.4.0/specifications/{date-3.5.1.gemspec → date-3.6.0.gemspec} +3 -3
  122. data/vendor/bundle/ruby/3.4.0/specifications/{fastimage-2.4.1.gemspec → fastimage-2.4.3.gemspec} +3 -3
  123. data/vendor/bundle/ruby/3.4.0/specifications/{net-imap-0.6.6.gemspec → net-imap-0.6.8.gemspec} +3 -3
  124. data/vendor/bundle/ruby/3.4.0/specifications/{net-protocol-0.3.0.gemspec → net-protocol-0.4.0.gemspec} +2 -2
  125. data/vendor/bundle/ruby/3.4.0/specifications/{net-smtp-0.5.1.gemspec → net-smtp-0.5.2.gemspec} +4 -4
  126. data/vendor/bundle/ruby/3.4.0/specifications/{pstore-0.2.1.gemspec → pstore-0.3.0.gemspec} +3 -2
  127. data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.7.gemspec → rack-3.2.8.gemspec} +2 -2
  128. data/views/preview.rhtml +2 -1
  129. data/views/preview.rhtml.en +2 -1
  130. data/views/update.rhtml +10 -1
  131. data/views/update.rhtml.en +10 -1
  132. metadata +242 -200
  133. data/misc/plugin/amp.rb +0 -118
  134. data/vendor/bundle/ruby/3.4.0/cache/date-3.5.1.gem +0 -0
  135. data/vendor/bundle/ruby/3.4.0/cache/fastimage-2.4.1.gem +0 -0
  136. data/vendor/bundle/ruby/3.4.0/cache/net-imap-0.6.6.gem +0 -0
  137. data/vendor/bundle/ruby/3.4.0/cache/net-protocol-0.3.0.gem +0 -0
  138. data/vendor/bundle/ruby/3.4.0/cache/net-smtp-0.5.1.gem +0 -0
  139. data/vendor/bundle/ruby/3.4.0/cache/pstore-0.2.1.gem +0 -0
  140. data/vendor/bundle/ruby/3.4.0/cache/rack-3.2.7.gem +0 -0
  141. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/date_core.so +0 -0
  142. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/gem_make.out +0 -24
  143. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/mkmf.log +0 -93
  144. data/vendor/bundle/ruby/3.4.0/gems/date-3.5.1/lib/date_core.so +0 -0
  145. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.6/README.md +0 -77
  146. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.6/Rakefile +0 -24
  147. data/views/amp.rhtml +0 -34
  148. /data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/{date-3.5.1 → bcrypt-3.1.22}/gem.build_complete +0 -0
  149. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/BSDL +0 -0
  150. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/COPYING +0 -0
  151. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/README.md +0 -0
  152. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_strftime.c +0 -0
  153. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/date_tmx.h +0 -0
  154. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/prereq.mk +0 -0
  155. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/zonetab.h +0 -0
  156. /data/vendor/bundle/ruby/3.4.0/gems/{date-3.5.1 → date-3.6.0}/ext/date/zonetab.list +0 -0
  157. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/MIT-LICENSE +0 -0
  158. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/README.md +0 -0
  159. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage.rb +0 -0
  160. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/bmp.rb +0 -0
  161. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/exif.rb +0 -0
  162. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/gif.rb +0 -0
  163. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/ico.rb +0 -0
  164. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/image_base.rb +0 -0
  165. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/jpeg.rb +0 -0
  166. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/jxlc.rb +0 -0
  167. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/png.rb +0 -0
  168. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/psd.rb +0 -0
  169. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/stream_util.rb +0 -0
  170. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/svg.rb +0 -0
  171. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/tiff.rb +0 -0
  172. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/type_parser.rb +0 -0
  173. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage/fastimage_parsing/webp.rb +0 -0
  174. /data/vendor/bundle/ruby/3.4.0/gems/{fastimage-2.4.1 → fastimage-2.4.3}/lib/fastimage.rb +0 -0
  175. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/BSDL +0 -0
  176. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/COPYING +0 -0
  177. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/LICENSE.txt +0 -0
  178. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/docs/styles.css +0 -0
  179. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/authenticators.rb +0 -0
  180. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/config/attr_inheritance.rb +0 -0
  181. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/config/attr_version_defaults.rb +0 -0
  182. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/connection_state.rb +0 -0
  183. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/data_encoding.rb +0 -0
  184. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/deprecated_client_options.rb +0 -0
  185. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/errors.rb +0 -0
  186. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/flags.rb +0 -0
  187. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/response_reader.rb +0 -0
  188. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/anonymous_authenticator.rb +0 -0
  189. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/authentication_exchange.rb +0 -0
  190. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/authenticators.rb +0 -0
  191. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/cram_md5_authenticator.rb +0 -0
  192. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/digest_md5_authenticator.rb +0 -0
  193. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/external_authenticator.rb +0 -0
  194. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/gs2_header.rb +0 -0
  195. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/login_authenticator.rb +0 -0
  196. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/oauthbearer_authenticator.rb +0 -0
  197. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/plain_authenticator.rb +0 -0
  198. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/protocol_adapters.rb +0 -0
  199. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/scram_algorithm.rb +0 -0
  200. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/scram_authenticator.rb +0 -0
  201. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/stringprep.rb +0 -0
  202. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl/xoauth2_authenticator.rb +0 -0
  203. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl.rb +0 -0
  204. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/sasl_adapter.rb +0 -0
  205. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep/nameprep.rb +0 -0
  206. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep/saslprep.rb +0 -0
  207. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep/saslprep_tables.rb +0 -0
  208. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep/tables.rb +0 -0
  209. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep/trace.rb +0 -0
  210. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/stringprep.rb +0 -0
  211. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/uidplus_data.rb +0 -0
  212. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/lib/net/imap/vanished_data.rb +0 -0
  213. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/net-imap.gemspec +0 -0
  214. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/rakelib/benchmarks.rake +0 -0
  215. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/rakelib/rfcs.rake +0 -0
  216. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/rakelib/saslprep.rake +0 -0
  217. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/rakelib/string_prep_tables_generator.rb +0 -0
  218. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.6.6 → net-imap-0.6.8}/sample/net-imap.rb +0 -0
  219. /data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.3.0 → net-protocol-0.4.0}/BSDL +0 -0
  220. /data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.3.0 → net-protocol-0.4.0}/COPYING +0 -0
  221. /data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.3.0 → net-protocol-0.4.0}/README.md +0 -0
  222. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/LICENSE.txt +0 -0
  223. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/NEWS.md +0 -0
  224. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/README.md +0 -0
  225. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp/auth_cram_md5.rb +0 -0
  226. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp/auth_login.rb +0 -0
  227. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp/auth_plain.rb +0 -0
  228. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp/auth_xoauth2.rb +0 -0
  229. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/lib/net/smtp/authenticator.rb +0 -0
  230. /data/vendor/bundle/ruby/3.4.0/gems/{net-smtp-0.5.1 → net-smtp-0.5.2}/net-smtp.gemspec +0 -0
  231. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/BSDL +0 -0
  232. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/COPYING +0 -0
  233. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/Gemfile +0 -0
  234. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/README.md +0 -0
  235. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/Rakefile +0 -0
  236. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/bin/console +0 -0
  237. /data/vendor/bundle/ruby/3.4.0/gems/{pstore-0.2.1 → pstore-0.3.0}/bin/setup +0 -0
  238. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/CONTRIBUTING.md +0 -0
  239. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/MIT-LICENSE +0 -0
  240. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/README.md +0 -0
  241. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/SPEC.rdoc +0 -0
  242. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/auth/abstract/handler.rb +0 -0
  243. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/auth/abstract/request.rb +0 -0
  244. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/auth/basic.rb +0 -0
  245. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/bad_request.rb +0 -0
  246. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/body_proxy.rb +0 -0
  247. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/builder.rb +0 -0
  248. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/cascade.rb +0 -0
  249. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/common_logger.rb +0 -0
  250. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/conditional_get.rb +0 -0
  251. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/config.rb +0 -0
  252. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/constants.rb +0 -0
  253. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/content_length.rb +0 -0
  254. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/content_type.rb +0 -0
  255. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/deflater.rb +0 -0
  256. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/directory.rb +0 -0
  257. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/etag.rb +0 -0
  258. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/events.rb +0 -0
  259. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/files.rb +0 -0
  260. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/head.rb +0 -0
  261. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/headers.rb +0 -0
  262. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/lint.rb +0 -0
  263. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/lock.rb +0 -0
  264. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/media_type.rb +0 -0
  265. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/method_override.rb +0 -0
  266. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/mime.rb +0 -0
  267. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/mock.rb +0 -0
  268. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/mock_request.rb +0 -0
  269. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/mock_response.rb +0 -0
  270. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/multipart/generator.rb +0 -0
  271. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/multipart.rb +0 -0
  272. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/null_logger.rb +0 -0
  273. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/query_parser.rb +0 -0
  274. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/recursive.rb +0 -0
  275. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/reloader.rb +0 -0
  276. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/response.rb +0 -0
  277. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/rewindable_input.rb +0 -0
  278. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/runtime.rb +0 -0
  279. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/sendfile.rb +0 -0
  280. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/show_exceptions.rb +0 -0
  281. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/show_status.rb +0 -0
  282. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/tempfile_reaper.rb +0 -0
  283. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/urlmap.rb +0 -0
  284. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack/utils.rb +0 -0
  285. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.7 → rack-3.2.8}/lib/rack.rb +0 -0
@@ -0,0 +1,192 @@
1
+ # bcrypt-ruby
2
+
3
+ An easy way to keep your users' passwords secure.
4
+
5
+ * https://github.com/bcrypt-ruby/bcrypt-ruby/tree/master
6
+
7
+ [![Github Actions Build Status](https://github.com/bcrypt-ruby/bcrypt-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/bcrypt-ruby/bcrypt-ruby/actions/workflows/ruby.yml)
8
+
9
+ ## Why you should use `bcrypt()`
10
+
11
+ If you store user passwords in the clear, then an attacker who steals a copy of your database has a giant list of emails
12
+ and passwords. Some of your users will only have one password -- for their email account, for their banking account, for
13
+ your application. A simple hack could escalate into massive identity theft.
14
+
15
+ It's your responsibility as a web developer to make your web application secure -- blaming your users for not being
16
+ security experts is not a professional response to risk.
17
+
18
+ `bcrypt()` allows you to easily harden your application against these kinds of attacks.
19
+
20
+ *Note*: JRuby versions of the bcrypt gem `<= 2.1.3` had a [security
21
+ vulnerability](https://www.mindrot.org/files/jBCrypt/internat.adv) that
22
+ was fixed in `>= 2.1.4`. If you used a vulnerable version to hash
23
+ passwords with international characters in them, you will need to
24
+ re-hash those passwords. This vulnerability only affected the JRuby gem.
25
+
26
+ ## How to install bcrypt
27
+
28
+ gem install bcrypt
29
+
30
+ The bcrypt gem is available on the following Ruby platforms:
31
+
32
+ * JRuby
33
+ * RubyInstaller builds on Windows with the DevKit
34
+ * Any modern Ruby on a BSD/OS X/Linux system with a compiler
35
+
36
+ ## How to use `bcrypt()` in your Rails application
37
+
38
+ *Note*: Rails versions >= 3 ship with `ActiveModel::SecurePassword` which uses bcrypt-ruby.
39
+ `has_secure_password` [docs](https://api.rubyonrails.org/classes/ActiveModel/SecurePassword/ClassMethods.html#method-i-has_secure_password)
40
+ implements a similar authentication strategy to the code below.
41
+
42
+ ### The _User_ model
43
+ ```ruby
44
+ require 'bcrypt'
45
+
46
+ class User < ActiveRecord::Base
47
+ # users.password_hash in the database is a :string
48
+ include BCrypt
49
+
50
+ def password
51
+ @password ||= Password.new(password_hash)
52
+ end
53
+
54
+ def password=(new_password)
55
+ @password = Password.create(new_password)
56
+ self.password_hash = @password
57
+ end
58
+ end
59
+ ```
60
+ ### Creating an account
61
+ ```ruby
62
+ def create
63
+ @user = User.new(params[:user])
64
+ @user.password = params[:password]
65
+ @user.save!
66
+ end
67
+ ```
68
+ ### Authenticating a user
69
+ ```ruby
70
+ def login
71
+ @user = User.find_by_email(params[:email])
72
+ if @user.password == params[:password]
73
+ give_token
74
+ else
75
+ redirect_to home_url
76
+ end
77
+ end
78
+ ```
79
+ ## How to use bcrypt-ruby in general
80
+ ```ruby
81
+ require 'bcrypt'
82
+
83
+ my_password = BCrypt::Password.create("my password")
84
+ #=> "$2a$12$K0ByB.6YI2/OYrB4fQOYLe6Tv0datUVf6VZ/2Jzwm879BW5K1cHey"
85
+
86
+ my_password.version #=> "2a"
87
+ my_password.cost #=> 12
88
+ my_password == "my password" #=> true
89
+ my_password == "not my password" #=> false
90
+
91
+ my_password = BCrypt::Password.new("$2a$12$K0ByB.6YI2/OYrB4fQOYLe6Tv0datUVf6VZ/2Jzwm879BW5K1cHey")
92
+ my_password == "my password" #=> true
93
+ my_password == "not my password" #=> false
94
+ ```
95
+ Check the rdocs for more details -- BCrypt, BCrypt::Password.
96
+
97
+ ## How `bcrypt()` works
98
+
99
+ `bcrypt()` is a hashing algorithm designed by Niels Provos and David Mazières of the OpenBSD Project.
100
+
101
+ ### Background
102
+
103
+ Hash algorithms take a chunk of data (e.g., your user's password) and create a "digital fingerprint," or hash, of it.
104
+ Because this process is not reversible, there's no way to go from the hash back to the password.
105
+
106
+ In other words:
107
+
108
+ hash(p) #=> <unique gibberish>
109
+
110
+ You can store the hash and check it against a hash made of a potentially valid password:
111
+
112
+ <unique gibberish> =? hash(just_entered_password)
113
+
114
+ ### Rainbow Tables
115
+
116
+ But even this has weaknesses -- attackers can just run lists of possible passwords through the same algorithm, store the
117
+ results in a big database, and then look up the passwords by their hash:
118
+
119
+ PrecomputedPassword.find_by_hash(<unique gibberish>).password #=> "secret1"
120
+
121
+ ### Salts
122
+
123
+ The solution to this is to add a small chunk of random data -- called a salt -- to the password before it's hashed:
124
+
125
+ hash(salt + p) #=> <really unique gibberish>
126
+
127
+ The salt is then stored along with the hash in the database, and used to check potentially valid passwords:
128
+
129
+ <really unique gibberish> =? hash(salt + just_entered_password)
130
+
131
+ bcrypt-ruby automatically handles the storage and generation of these salts for you.
132
+
133
+ Adding a salt means that an attacker has to have a gigantic database for each unique salt -- for a salt made of 4
134
+ letters, that's 456,976 different databases. Pretty much no one has that much storage space, so attackers try a
135
+ different, slower method -- throw a list of potential passwords at each individual password:
136
+
137
+ hash(salt + "aadvark") =? <really unique gibberish>
138
+ hash(salt + "abacus") =? <really unique gibberish>
139
+ etc.
140
+
141
+ This is much slower than the big database approach, but most hash algorithms are pretty quick -- and therein lies the
142
+ problem. Hash algorithms aren't usually designed to be slow, they're designed to turn gigabytes of data into secure
143
+ fingerprints as quickly as possible. `bcrypt()`, though, is designed to be computationally expensive:
144
+
145
+ Ten thousand iterations:
146
+ user system total real
147
+ md5 0.070000 0.000000 0.070000 ( 0.070415)
148
+ bcrypt 22.230000 0.080000 22.310000 ( 22.493822)
149
+
150
+ If an attacker was using Ruby to check each password, they could check ~140,000 passwords a second with MD5 but only
151
+ ~450 passwords a second with `bcrypt()`.
152
+
153
+ ### Cost Factors
154
+
155
+ In addition, `bcrypt()` allows you to increase the amount of work required to hash a password as computers get faster. Old
156
+ passwords will still work fine, but new passwords can keep up with the times.
157
+
158
+ The default cost factor used by bcrypt-ruby is 12, which is fine for session-based authentication. If you are using a
159
+ stateless authentication architecture (e.g., HTTP Basic Auth), you will want to lower the cost factor to reduce your
160
+ server load and keep your request times down. This will lower the security provided you, but there are few alternatives.
161
+
162
+ To change the default cost factor used by bcrypt-ruby, use `BCrypt::Engine.cost = new_value`:
163
+ ```ruby
164
+ BCrypt::Password.create('secret').cost
165
+ #=> 12, the default provided by bcrypt-ruby
166
+
167
+ # set a new default cost
168
+ BCrypt::Engine.cost = 8
169
+ BCrypt::Password.create('secret').cost
170
+ #=> 8
171
+ ```
172
+ The default cost can be overridden as needed by passing an options hash with a different cost:
173
+
174
+ BCrypt::Password.create('secret', :cost => 6).cost #=> 6
175
+
176
+ ## More Information
177
+
178
+ `bcrypt()` is currently used as the default password storage hash in OpenBSD, widely regarded as the most secure operating
179
+ system available.
180
+
181
+ For a more technical explanation of the algorithm and its design criteria, please read Niels Provos and David Mazières'
182
+ Usenix99 paper:
183
+ https://www.usenix.org/events/usenix99/provos.html
184
+
185
+ If you'd like more down-to-earth advice regarding cryptography, I suggest reading <i>Practical Cryptography</i> by Niels
186
+ Ferguson and Bruce Schneier:
187
+ https://www.schneier.com/book-practical.html
188
+
189
+ # Etc
190
+
191
+ * Author :: Coda Hale <coda.hale@gmail.com>
192
+ * Website :: https://codahale.com