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
@@ -327,12 +327,13 @@ require "digest"
327
327
  #
328
328
  class PStore
329
329
  # :stopdoc:
330
- VERSION = "0.2.1"
330
+ VERSION = "0.3.0"
331
331
 
332
- RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
333
- RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
334
- WR_ACCESS = {mode: IO::WRONLY | IO::CREAT | IO::TRUNC | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze
335
- private_constant :RDWR_ACCESS, :RD_ACCESS, :WR_ACCESS
332
+ RDWR_ACCESS = IO::RDWR | IO::CREAT | IO::BINARY
333
+ RD_ACCESS = IO::RDONLY | IO::BINARY
334
+ WR_ACCESS = IO::WRONLY | IO::CREAT | IO::TRUNC | IO::BINARY
335
+ NOFOLLOW = IO.const_defined?(:NOFOLLOW) ? IO::NOFOLLOW : 0
336
+ private_constant :RDWR_ACCESS, :RD_ACCESS, :WR_ACCESS, :NOFOLLOW
336
337
  # :startdoc:
337
338
 
338
339
  # The error type thrown by all PStore methods.
@@ -367,12 +368,26 @@ class PStore
367
368
  #
368
369
  # A \PStore object is
369
370
  # {reentrant}[https://en.wikipedia.org/wiki/Reentrancy_(computing)].
370
- # If argument +thread_safe+ is given as +true+,
371
+ # If argument or keyword argument +thread_safe+ is given as +true+,
371
372
  # the object is also thread-safe (at the cost of a small performance penalty):
372
373
  #
373
374
  # store = PStore.new(path, true)
375
+ # store = PStore.new(path, thread_safe: true)
374
376
  #
375
- def initialize(file, thread_safe = false)
377
+ # If keyword argument +ultra_safe+ is given as +true+, the object is
378
+ # set to +ultra_safe+ mode.
379
+ #
380
+ # store = PStore.new(path, ultra_safe: true)
381
+ #
382
+ # If keyword argument +follow_symlink+ is given as +false+, the store file
383
+ # itself must not be a symbolic link. This option has no effect on platforms
384
+ # that do not support IO::NOFOLLOW. Symbolic links in parent directories are
385
+ # not affected.
386
+ #
387
+ # store = PStore.new(path, follow_symlink: false)
388
+ #
389
+ def initialize(file, _thread_safe = false, thread_safe: _thread_safe,
390
+ ultra_safe: false, follow_symlink: true)
376
391
  dir = File::dirname(file)
377
392
  unless File::directory? dir
378
393
  raise PStore::Error, format("directory %s does not exist", dir)
@@ -380,16 +395,17 @@ class PStore
380
395
  if File::exist? file and not File::readable? file
381
396
  raise PStore::Error, format("file %s not readable", file)
382
397
  end
383
- @filename = file
398
+ @filename = File.path(file)
384
399
  @abort = false
385
- @ultra_safe = false
400
+ @ultra_safe = ultra_safe
386
401
  @thread_safe = thread_safe
402
+ @nofollow = follow_symlink ? 0 : NOFOLLOW
387
403
  @lock = Thread::Mutex.new
388
404
  end
389
405
 
390
406
  # Raises PStore::Error if the calling code is not in a PStore#transaction.
391
407
  def in_transaction
392
- raise PStore::Error, "not in transaction" unless @lock.locked?
408
+ raise PStore::Error, "not in transaction" unless @lock.owned?
393
409
  end
394
410
  #
395
411
  # Raises PStore::Error if the calling code is not in a PStore#transaction or
@@ -439,7 +455,7 @@ class PStore
439
455
  def fetch(key, default=PStore::Error)
440
456
  in_transaction
441
457
  unless @table.key? key
442
- if default == PStore::Error
458
+ if PStore::Error.equal?(default)
443
459
  raise PStore::Error, format("undefined key '%s'", key)
444
460
  else
445
461
  return default
@@ -527,7 +543,7 @@ class PStore
527
543
  def commit
528
544
  in_transaction
529
545
  @abort = false
530
- throw :pstore_abort_transaction
546
+ throw self
531
547
  end
532
548
 
533
549
  # Exits the current transaction block, discarding any changes
@@ -538,7 +554,7 @@ class PStore
538
554
  def abort
539
555
  in_transaction
540
556
  @abort = true
541
- throw :pstore_abort_transaction
557
+ throw self
542
558
  end
543
559
 
544
560
  # Opens a transaction block for the store.
@@ -570,7 +586,7 @@ class PStore
570
586
  begin
571
587
  @table, checksum, original_data_size = load_data(file, read_only)
572
588
 
573
- catch(:pstore_abort_transaction) do
589
+ catch(self) do
574
590
  value = yield(self)
575
591
  end
576
592
 
@@ -583,7 +599,7 @@ class PStore
583
599
  else
584
600
  # This can only occur if read_only == true.
585
601
  @table = {}
586
- catch(:pstore_abort_transaction) do
602
+ catch(self) do
587
603
  value = yield(self)
588
604
  end
589
605
  end
@@ -621,23 +637,26 @@ class PStore
621
637
  # All exceptions are propagated.
622
638
  #
623
639
  def open_and_lock_file(filename, read_only)
624
- if read_only
625
- begin
626
- file = File.new(filename, **RD_ACCESS)
640
+ filename = File.path(filename)
641
+ loop do
642
+ if read_only
627
643
  begin
628
- file.flock(File::LOCK_SH)
629
- return file
630
- rescue
631
- file.close
632
- raise
644
+ file = File.new(filename, mode: RD_ACCESS | @nofollow, encoding: Encoding::ASCII_8BIT)
645
+ rescue Errno::ENOENT
646
+ return nil
633
647
  end
634
- rescue Errno::ENOENT
635
- return nil
648
+ else
649
+ file = File.new(filename, mode: RDWR_ACCESS | @nofollow, encoding: Encoding::ASCII_8BIT)
650
+ end
651
+ current = false
652
+ begin
653
+ file.flock(read_only ? File::LOCK_SH : File::LOCK_EX)
654
+ # An atomic save may have replaced the file while this lock was pending.
655
+ current = File.identical?(file, filename)
656
+ return file if current
657
+ ensure
658
+ file.close unless current
636
659
  end
637
- else
638
- file = File.new(filename, **RDWR_ACCESS)
639
- file.flock(File::LOCK_EX)
640
- return file
641
660
  end
642
661
  end
643
662
 
@@ -651,6 +670,7 @@ class PStore
651
670
  table = load(file)
652
671
  raise Error, "PStore file seems to be corrupted." unless table.is_a?(Hash)
653
672
  rescue EOFError
673
+ raise unless file.size == 0
654
674
  # This seems to be a newly-created file.
655
675
  table = {}
656
676
  end
@@ -694,13 +714,14 @@ class PStore
694
714
 
695
715
  def save_data_with_atomic_file_rename_strategy(data, file)
696
716
  temp_filename = "#{@filename}.tmp.#{Process.pid}.#{rand 1000000}"
697
- temp_file = File.new(temp_filename, **WR_ACCESS)
717
+ temp_file = File.new(temp_filename, mode: WR_ACCESS | @nofollow, encoding: Encoding::ASCII_8BIT, perm: 0o000)
698
718
  begin
699
719
  temp_file.flock(File::LOCK_EX)
700
720
  temp_file.write(data)
701
721
  temp_file.flush
722
+ temp_file.chmod(file.stat.mode)
702
723
  File.rename(temp_filename, @filename)
703
- rescue
724
+ rescue Exception
704
725
  File.unlink(temp_file) rescue nil
705
726
  raise
706
727
  ensure
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.description = spec.summary
18
18
  spec.homepage = "https://github.com/ruby/pstore"
19
19
  spec.licenses = ["Ruby", "BSD-2-Clause"]
20
+ spec.required_ruby_version = ">= 2.4"
20
21
 
21
22
  spec.metadata["homepage_uri"] = spec.homepage
22
23
  spec.metadata["source_code_uri"] = "https://github.com/ruby/pstore"
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [3.2.8] - 2026-10-30
6
+
7
+ ### Security
8
+
9
+ - [GHSA-5v64-555j-wjxm](https://github.com/advisories/GHSA-5v64-555j-wjxm) Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion.
10
+ - [GHSA-wvg4-6p58-3gh3](https://github.com/advisories/GHSA-wvg4-6p58-3gh3) `Rack::Static` header rules were matched against an unnormalized path, allowing dot segments to bypass them.
11
+ - [GHSA-2j8w-xcrc-x985](https://github.com/advisories/GHSA-2j8w-xcrc-x985) `Rack::Request#host_with_port`, `#base_url`, and `#url` returned the raw authority when it was invalid; `host_with_port` now returns `nil` in that case.
12
+ - [GHSA-p8x9-v4hv-2w4g](https://github.com/advisories/GHSA-p8x9-v4hv-2w4g) Multipart requests with more than one `boundary` parameter were accepted when the first value was empty or began with a quote, semicolon, or comma, bypassing the guard added for CVE-2026-26961.
13
+
14
+ ### Fixed
15
+
16
+ - `Rack::Multipart::UploadedFile` now delegates keyword arguments to the wrapped tempfile. Calls such as `uploaded_file.readlines(chomp: true)` raised `TypeError` on Ruby 3.0+. ([#2481](https://github.com/rack/rack/issues/2481), [#2501](https://github.com/rack/rack/pull/2501), [@SeanLF](https://github.com/SeanLF))
17
+
5
18
  ## [3.2.7] - 2026-08-13
6
19
 
7
20
  ### Fixed
@@ -115,6 +128,15 @@ This release continues Rack's evolution toward a cleaner, more efficient foundat
115
128
  - `SERVER_NAME` and `HTTP_HOST` are now more strictly validated according to the relevant specifications. ([#2298](https://github.com/rack/rack/pull/2298), [@ioquatix])
116
129
  - `Rack::Lint` now disallows `PATH_INFO="" SCRIPT_NAME=""`. ([#2298](https://github.com/rack/rack/issues/2307), [@jeremyevans])
117
130
 
131
+ ## [3.1.23] - 2026-10-30
132
+
133
+ ### Security
134
+
135
+ - [GHSA-5v64-555j-wjxm](https://github.com/advisories/GHSA-5v64-555j-wjxm) Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion.
136
+ - [GHSA-wvg4-6p58-3gh3](https://github.com/advisories/GHSA-wvg4-6p58-3gh3) `Rack::Static` header rules were matched against an unnormalized path, allowing dot segments to bypass them.
137
+ - [GHSA-2j8w-xcrc-x985](https://github.com/advisories/GHSA-2j8w-xcrc-x985) `Rack::Request#host_with_port`, `#base_url`, and `#url` returned the raw authority when it was invalid; `host_with_port` now returns `nil` in that case.
138
+ - [GHSA-p8x9-v4hv-2w4g](https://github.com/advisories/GHSA-p8x9-v4hv-2w4g) Multipart requests with more than one `boundary` parameter were accepted when the first value was empty or began with a quote, semicolon, or comma, bypassing the guard added for CVE-2026-26961.
139
+
118
140
  ## [3.1.22] - 2026-08-13
119
141
 
120
142
  ### Security
@@ -539,6 +561,18 @@ This release introduces major improvements to Rack, including enhanced support f
539
561
  - Fix multipart filename generation for filenames that contain spaces. Encode spaces as "%20" instead of "+" which will be decoded properly by the multipart parser. ([#1736](https://github.com/rack/rack/pull/1645), [@muirdm](https://github.com/muirdm))
540
562
  - `Rack::Request#scheme` returns `ws` or `wss` when one of the `X-Forwarded-Scheme` / `X-Forwarded-Proto` headers is set to `ws` or `wss`, respectively. ([#1730](https://github.com/rack/rack/issues/1730), [@erwanst](https://github.com/erwanst))
541
563
 
564
+ ## [2.2.25] - 2026-10-30
565
+
566
+ ### Security
567
+
568
+ - [GHSA-5v64-555j-wjxm](https://github.com/advisories/GHSA-5v64-555j-wjxm) Multipart parser retains parsed data in its scan buffer, allowing denial of service via memory exhaustion.
569
+ - [GHSA-wvg4-6p58-3gh3](https://github.com/advisories/GHSA-wvg4-6p58-3gh3) `Rack::Static` header rules were matched against an unnormalized path, allowing dot segments to bypass them.
570
+ - [GHSA-p8x9-v4hv-2w4g](https://github.com/advisories/GHSA-p8x9-v4hv-2w4g) Multipart requests with more than one `boundary` parameter were accepted when the first value was empty or began with a quote, semicolon, or comma, bypassing the guard added for CVE-2026-26961.
571
+
572
+ ### Fixed
573
+
574
+ - Multipart parser: scan boundary lines with a literal newline search instead of a backtracking regexp, which allocated tens of megabytes per scan for long lines and made the scan buffer fix above ineffective on this series.
575
+
542
576
  ## [2.2.24] - 2026-08-13
543
577
 
544
578
  ### Security
@@ -127,7 +127,11 @@ module Rack
127
127
  unless data[1].empty?
128
128
  raise Error, "whitespace between boundary parameter name and equal sign"
129
129
  end
130
- if data.post_match.match?(/boundary\s*=/i)
130
+ # Count across the whole header rather than only after the match: the
131
+ # lazy prefix in MULTIPART can skip a first boundary parameter whose
132
+ # value is empty or starts with a quote, semicolon, or comma. Also
133
+ # count RFC 2231 boundary* parameters, which some parsers prefer.
134
+ if content_type.scan(/boundary(?:\*\d*\*?)?\s*=/i).size > 1
131
135
  raise BoundaryTooLongError, "multiple boundary parameters found in multipart content type"
132
136
  end
133
137
 
@@ -494,6 +498,7 @@ module Rack
494
498
  # buffering. Note that the actual limit is the higher of 64KB and the buffer size (1MB by default)
495
499
  raise Error, "multipart mime part header too large" if @sbuf.rest.bytesize > MIME_HEADER_BYTESIZE_LIMIT
496
500
 
501
+ @sbuf.string = @sbuf.rest
497
502
  return :want_read
498
503
  end
499
504
  end
@@ -514,8 +519,8 @@ module Rack
514
519
  update_retained_size(body.bytesize) if @body_retained
515
520
  @collector.on_mime_body @mime_index, body
516
521
  @sbuf.pos += delta
517
- @sbuf.string = @sbuf.rest
518
522
  end
523
+ @sbuf.string = @sbuf.rest
519
524
  :want_read
520
525
  end
521
526
  end
@@ -77,6 +77,7 @@ module Rack
77
77
  def method_missing(method_name, *args, &block) #:nodoc:
78
78
  @tempfile.__send__(method_name, *args, &block)
79
79
  end
80
+ ruby2_keywords(:method_missing) if respond_to?(:ruby2_keywords, true)
80
81
  end
81
82
  end
82
83
  end
@@ -325,8 +325,10 @@ module Rack
325
325
  end
326
326
 
327
327
  def host_with_port(authority = self.authority)
328
- host, _, port = split_authority(authority)
328
+ parts = split_authority(authority)
329
+ return nil if parts.empty?
329
330
 
331
+ host, _, port = parts
330
332
  if port == DEFAULT_PORTS[self.scheme]
331
333
  host
332
334
  else
@@ -592,7 +594,8 @@ module Rack
592
594
  end
593
595
 
594
596
  def base_url
595
- "#{scheme}://#{host_with_port}"
597
+ hostport = host_with_port || host_with_port(server_authority)
598
+ "#{scheme}://#{hostport}"
596
599
  end
597
600
 
598
601
  # Tries to return a remake of the original request URL as a string.
@@ -168,7 +168,7 @@ module Rack
168
168
 
169
169
  # Convert HTTP header rules to HTTP headers
170
170
  def applicable_rules(path)
171
- path = ::Rack::Utils.unescape_path(path)
171
+ path = ::Rack::Utils.clean_path_info(::Rack::Utils.unescape_path(path))
172
172
 
173
173
  @header_rules.find_all do |rule, new_headers|
174
174
  case rule
@@ -6,7 +6,7 @@
6
6
  # See MIT-LICENSE or https://opensource.org/licenses/MIT.
7
7
 
8
8
  module Rack
9
- VERSION = "3.2.7"
9
+ VERSION = "3.2.8"
10
10
 
11
11
  RELEASE = VERSION
12
12
 
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: bcrypt 3.1.22 ruby lib
3
+ # stub: ext/mri/extconf.rb
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "bcrypt".freeze
7
+ s.version = "3.1.22".freeze
8
+
9
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
+ s.metadata = { "changelog_uri" => "https://github.com/bcrypt-ruby/bcrypt-ruby/blob/master/CHANGELOG" } if s.respond_to? :metadata=
11
+ s.require_paths = ["lib".freeze]
12
+ s.authors = ["Coda Hale".freeze]
13
+ s.date = "1980-01-02"
14
+ s.description = " bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project\n for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling\n passwords.\n".freeze
15
+ s.email = "coda.hale@gmail.com".freeze
16
+ s.extensions = ["ext/mri/extconf.rb".freeze]
17
+ s.extra_rdoc_files = ["CHANGELOG".freeze, "COPYING".freeze, "README.md".freeze, "lib/bcrypt.rb".freeze, "lib/bcrypt/engine.rb".freeze, "lib/bcrypt/error.rb".freeze, "lib/bcrypt/password.rb".freeze]
18
+ s.files = ["CHANGELOG".freeze, "COPYING".freeze, "README.md".freeze, "ext/mri/extconf.rb".freeze, "lib/bcrypt.rb".freeze, "lib/bcrypt/engine.rb".freeze, "lib/bcrypt/error.rb".freeze, "lib/bcrypt/password.rb".freeze]
19
+ s.homepage = "https://github.com/bcrypt-ruby/bcrypt-ruby".freeze
20
+ s.licenses = ["MIT".freeze]
21
+ s.rdoc_options = ["--title".freeze, "bcrypt-ruby".freeze, "--line-numbers".freeze, "--inline-source".freeze, "--main".freeze, "README.md".freeze]
22
+ s.rubygems_version = "4.0.6".freeze
23
+ s.summary = "OpenBSD's bcrypt() password hashing algorithm.".freeze
24
+
25
+ s.installed_by_version = "3.6.9".freeze
26
+
27
+ s.specification_version = 4
28
+
29
+ s.add_development_dependency(%q<rake-compiler>.freeze, ["~> 1.2.0".freeze])
30
+ s.add_development_dependency(%q<rspec>.freeze, [">= 3".freeze])
31
+ s.add_development_dependency(%q<rdoc>.freeze, [">= 7.0.3".freeze])
32
+ s.add_development_dependency(%q<benchmark>.freeze, [">= 0.5.0".freeze])
33
+ end
@@ -1,16 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: date 3.5.1 ruby lib
2
+ # stub: date 3.6.0 ruby lib
3
3
  # stub: ext/date/extconf.rb
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "date".freeze
7
- s.version = "3.5.1".freeze
7
+ s.version = "3.6.0".freeze
8
8
 
9
9
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
10
  s.metadata = { "changelog_uri" => "https://github.com/ruby/date/releases" } if s.respond_to? :metadata=
11
11
  s.require_paths = ["lib".freeze]
12
12
  s.authors = ["Tadayoshi Funaba".freeze]
13
- s.date = "2025-12-10"
13
+ s.date = "2026-10-08"
14
14
  s.description = "The official date library for Ruby.".freeze
15
15
  s.email = [nil]
16
16
  s.extensions = ["ext/date/extconf.rb".freeze]
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: fastimage 2.4.1 ruby lib
2
+ # stub: fastimage 2.4.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fastimage".freeze
6
- s.version = "2.4.1".freeze
6
+ s.version = "2.4.3".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Stephen Sykes".freeze]
11
- s.date = "2026-03-10"
11
+ s.date = "2026-10-24"
12
12
  s.description = "FastImage finds the size or type of an image given its uri by fetching as little as needed.".freeze
13
13
  s.email = "sdsykes@gmail.com".freeze
14
14
  s.extra_rdoc_files = ["README.md".freeze]
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: net-imap 0.6.6 ruby lib
2
+ # stub: net-imap 0.6.8 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "net-imap".freeze
6
- s.version = "0.6.6".freeze
6
+ s.version = "0.6.8".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "changelog_uri" => "https://github.com/ruby/net-imap/releases", "homepage_uri" => "https://github.com/ruby/net-imap", "source_code_uri" => "https://github.com/ruby/net-imap" } if s.respond_to? :metadata=
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.homepage = "https://github.com/ruby/net-imap".freeze
17
17
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
18
18
  s.required_ruby_version = Gem::Requirement.new(">= 3.2.0".freeze)
19
- s.rubygems_version = "4.0.17".freeze
19
+ s.rubygems_version = "4.0.22".freeze
20
20
  s.summary = "Ruby client api for Internet Message Access Protocol".freeze
21
21
 
22
22
  s.installed_by_version = "3.6.9".freeze
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: net-protocol 0.3.0 ruby lib
2
+ # stub: net-protocol 0.4.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "net-protocol".freeze
6
- s.version = "0.3.0".freeze
6
+ s.version = "0.4.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "changelog_uri" => "https://github.com/ruby/net-protocol/releases", "homepage_uri" => "https://github.com/ruby/net-protocol", "source_code_uri" => "https://github.com/ruby/net-protocol" } if s.respond_to? :metadata=
@@ -1,21 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: net-smtp 0.5.1 ruby lib
2
+ # stub: net-smtp 0.5.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "net-smtp".freeze
6
- s.version = "0.5.1".freeze
6
+ s.version = "0.5.2".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "homepage_uri" => "https://github.com/ruby/net-smtp", "source_code_uri" => "https://github.com/ruby/net-smtp" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["Yukihiro Matsumoto".freeze]
12
- s.date = "2025-02-05"
12
+ s.date = "1980-01-02"
13
13
  s.description = "Simple Mail Transfer Protocol client library for Ruby.".freeze
14
14
  s.email = ["matz@ruby-lang.org".freeze]
15
15
  s.homepage = "https://github.com/ruby/net-smtp".freeze
16
16
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
17
17
  s.required_ruby_version = Gem::Requirement.new(">= 2.6.0".freeze)
18
- s.rubygems_version = "3.7.0.dev".freeze
18
+ s.rubygems_version = "3.6.9".freeze
19
19
  s.summary = "Simple Mail Transfer Protocol client library for Ruby.".freeze
20
20
 
21
21
  s.installed_by_version = "3.6.9".freeze
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: pstore 0.2.1 ruby lib
2
+ # stub: pstore 0.3.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "pstore".freeze
6
- s.version = "0.2.1".freeze
6
+ s.version = "0.3.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "homepage_uri" => "https://github.com/ruby/pstore", "source_code_uri" => "https://github.com/ruby/pstore" } if s.respond_to? :metadata=
@@ -15,6 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.email = ["matz@ruby-lang.org".freeze]
16
16
  s.homepage = "https://github.com/ruby/pstore".freeze
17
17
  s.licenses = ["Ruby".freeze, "BSD-2-Clause".freeze]
18
+ s.required_ruby_version = Gem::Requirement.new(">= 2.4".freeze)
18
19
  s.rubygems_version = "3.6.9".freeze
19
20
  s.summary = "Transactional File Storage for Ruby Objects".freeze
20
21
 
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rack 3.2.7 ruby lib
2
+ # stub: rack 3.2.8 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rack".freeze
6
- s.version = "3.2.7".freeze
6
+ s.version = "3.2.8".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "bug_tracker_uri" => "https://github.com/rack/rack/issues", "changelog_uri" => "https://github.com/rack/rack/blob/main/CHANGELOG.md", "documentation_uri" => "https://rubydoc.info/github/rack/rack", "rubygems_mfa_required" => "true", "source_code_uri" => "https://github.com/rack/rack" } if s.respond_to? :metadata=
data/views/preview.rhtml CHANGED
@@ -50,8 +50,9 @@ end
50
50
  <div class="update day">
51
51
  <h2><span class="title">更新フォーム</span></h2>
52
52
  <div class="form">
53
- <form class="update" method="post" action="<%=h @conf.update %>"><div>
53
+ <form class="update" method="post" action="<%=h @conf.update %>" data-unsaved="true"><div>
54
54
  <input type="hidden" name="old" value="<%=h @old_date %>">
55
+ <input type="hidden" name="last_modified" value="<%=h @request.param( 'last_modified' ) %>">
55
56
  <%=@csrf_protection%>
56
57
  <span class="field year">
57
58
  <input type="hidden" id="year" name="year" value="<%= @date.year %>"><%= @date.year %>年
@@ -37,9 +37,10 @@ param = {
37
37
  <div class="update day">
38
38
  <h2><span class="title">Updating Form</span></h2>
39
39
  <div class="form">
40
- <form class="update" method="post" action="<%=h @conf.update %>"><div>
40
+ <form class="update" method="post" action="<%=h @conf.update %>" data-unsaved="true"><div>
41
41
  <%=@csrf_protection%>
42
42
  <input type="hidden" name="old" value="<%=h @old_date %>">
43
+ <input type="hidden" name="last_modified" value="<%=h @request.param( 'last_modified' ) %>">
43
44
  <span class="field year">
44
45
  <input type="hidden" id="year" name="year" value="<%= @date.year %>"><%= @date.year %>-
45
46
  </span>
data/views/update.rhtml CHANGED
@@ -22,9 +22,18 @@ end
22
22
  <div class="update day">
23
23
  <h2><span class="title">日記の更新</span></h2>
24
24
  <div class="form">
25
- <form class="update" method="post" action="<%=h @conf.update %>"><div>
25
+ <% if @request.legacy_password? then %>
26
+ <p class="message">パスワードが古いCRYPT方式で保存されています。CRYPT方式はRubyで非推奨になり、いずれログインできなくなります。.htpasswdファイルを削除してから、tdiary htpasswdコマンドでbcrypt方式のパスワードを作り直してください。Apacheのhtpasswdコマンドでも「htpasswd -cB .htpasswd ユーザ名」で作れるので、サーバーでコマンドを実行できない場合は、手元で作ったファイルをサーバーに置いてください。</p>
27
+ <% end %>
28
+ <% if @rejected.kind_of?( BadDateError ) then %>
29
+ <p class="message">日付「<%=h @rejected.message %>」は存在しないため、保存していません。日付を指定し直して、もう一度送ってください。</p>
30
+ <% elsif @rejected.kind_of?( ConflictError ) then %>
31
+ <p class="message">このフォームを開いた後に、この日の日記が別の場所で更新されています。もう一度送ると、その更新を上書きします。</p>
32
+ <% end %>
33
+ <form class="update" method="post" action="<%=h @conf.update %>"<% if @rejected then %> data-unsaved="true"<% end %>><div>
26
34
  <h3 class="subtitle">日記本文</h3>
27
35
  <input type="hidden" name="old" value="<%= @date.strftime( '%Y%m%d' ) %>">
36
+ <input type="hidden" name="last_modified" value="<%= @diary.last_modified.to_i %>">
28
37
  <%=@csrf_protection%>
29
38
  <span class="field year">
30
39
  <input class="field" id="year" name="year" tabindex="1"<%= accesskeys['year'] %> size="4" value="<%= @date.year %>">年
@@ -5,9 +5,18 @@
5
5
  <div class="update day">
6
6
  <h2><span class="title">Updating Diary</span></h2>
7
7
  <div class="form">
8
- <form class="update" method="post" action="<%=h @conf.update %>"><div>
8
+ <% if @request.legacy_password? then %>
9
+ <p class="message">Your password is stored in the old CRYPT format. CRYPT is deprecated in Ruby, and you will not be able to log in with it in the future. Remove the .htpasswd file and create a bcrypt password again with the tdiary htpasswd command. Apache's htpasswd command also creates it with "htpasswd -cB .htpasswd username", so if you cannot run commands on the server, create the file on your computer and put it on the server.</p>
10
+ <% end %>
11
+ <% if @rejected.kind_of?( BadDateError ) then %>
12
+ <p class="message">The date "<%=h @rejected.message %>" does not exist, so the diary was not saved. Set the date again and send it once more.</p>
13
+ <% elsif @rejected.kind_of?( ConflictError ) then %>
14
+ <p class="message">This day was updated somewhere else after this form was opened. Sending it again overwrites that update.</p>
15
+ <% end %>
16
+ <form class="update" method="post" action="<%=h @conf.update %>"<% if @rejected then %> data-unsaved="true"<% end %>><div>
9
17
  <h3 class="subtitle">Diary Body</h3>
10
18
  <input type="hidden" name="old" value="<%= @date.strftime( '%Y%m%d' ) %>">
19
+ <input type="hidden" name="last_modified" value="<%= @diary.last_modified.to_i %>">
11
20
  <%=@csrf_protection%>
12
21
  <span class="field year">
13
22
  <input class="field" id="year" name="year" tabindex="1" accesskey="Y" size="4" value="<%= @date.year %>">-