discourse/lib
Kelvin 45a97ad82f Fix SMTP connection test
This test did not support 'no auth' use case and other auth methods except 'login'. I fixed it by simply making the call to start() in the right way. 
As shown in the source code of Net::SMTP (https://github.com/ruby/ruby/blob/ruby_2_5/lib/net/smtp.rb#L452), the start() function does accept the 'user' and 'secret' arguments. Also, in do_start() function (https://github.com/ruby/ruby/blob/ruby_2_5/lib/net/smtp.rb#L542), it automatically checks the auth method and args, skips the authentication if 'user' is not provided, and selects the right auth method from 'plain', 'login' or 'cram_md5'. This is exactly all of what we should do in a connection test and the odd 'auth_login' call in the previous code makes problems. 
BTW, I am using 'localhost' as the third argument, which is the same as the default value in start(). This parameter is the domain address sent along with the 'ehlo' command in SMTP protocol. I have seen some documents, e.g. https://github.com/tpn/msmtp/blob/master/doc/msmtp.1#L455, saying that 'localhost' is fine. It works for me.
2019-03-15 09:50:51 -04:00
..
active_record/connection_adapters DEV: Allow custom value when pausing sidekiq to aid in debugging. 2019-02-19 10:55:53 +08:00
auth FEATURE: Fetch email from auth provider if current user email is invalid (#7163) 2019-03-14 11:33:30 +00:00
autospec DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717) 2018-12-04 11:48:13 +08:00
backup_restore FEATURE: Allow discourse script to skip disabling of emails after restore 2019-03-07 21:49:33 +01:00
common_passwords Make rubocop happy again. 2018-06-07 13:28:18 +08:00
content_security_policy FEATURE: Calculate CSP based on active themes (#6976) 2019-02-11 12:32:04 +00:00
demon FEATURE: introduce ultra_low priority queue 2019-01-17 14:53:19 +11:00
email FEATURE: Skip sending emails to domains on the .invalid TLD (#7162) 2019-03-13 16:17:59 +00:00
emoji FEATURE: Allow plugins to add custom emoji translations 2019-01-04 15:27:46 +01:00
es6_module_transpiler DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717) 2018-12-04 11:48:13 +08:00
file_store Fix the build. 2019-03-13 17:39:07 +08:00
freedom_patches HTTPSify links (#7046) 2019-02-22 16:29:27 +01:00
generators REFACTOR: Move queue_jobs out of SiteSetting 2019-03-14 10:47:38 -04:00
guardian REFACTOR: Rename site settings to make them less confusing 2019-03-14 13:40:14 +01:00
highlight_js DEV: already defined constant 'HIGHLIGHTJS_DIR' 2019-01-21 10:12:23 +01:00
i18n REFACTOR: Use keyword argument for fallback_to_english flag 2019-02-19 15:28:47 +01:00
import
import_export Enable Lint/ShadowingOuterLocalVariable for Rubocop. 2018-09-04 10:16:42 +08:00
javascripts DEV: Yarn-manage moment and moment-timezone libraries 2019-02-12 13:57:52 -05:00
middleware FEATURE: Optional detailed performance logging for Sidekiq jobs (#7091) 2019-03-05 11:19:11 +00:00
migration DEV: Enable Style/SingleLineMethods and Style/Semicolon in Rubocop (#6717) 2018-12-04 11:48:13 +08:00
onebox Upgrade to FontAwesome 5 (take two) (#6673) 2018-11-26 16:49:57 -05:00
plugin FEATURE: Add localized timezone names (#7004) 2019-02-25 14:40:02 -05:00
pretty_text Revert "FIX: Better emoji escaping for topic title" 2019-03-13 13:02:56 +01:00
rate_limiter Add specs for RateLimiter::LimitExceeded#description. 2018-06-19 07:48:03 +08:00
scheduler FEATURE: log long running jobs in the defer queue 2018-10-12 17:03:47 +11:00
search FEATURE: displays groups in menu search (#7090) 2019-03-04 10:30:09 +01:00
sidekiq Fix deadblock in 615a22a579. 2019-02-20 10:25:43 +08:00
site_settings REFACTOR: Rename site settings to make them less confusing 2019-03-14 13:40:14 +01:00
stylesheet FIX: Sanitize theme settings properly before injecting into stylesheets (#7031) 2019-03-08 08:58:06 +00:00
svg_sprite FEATURE: support custom icons in themes (#7155) 2019-03-15 17:16:15 +11:00
tasks Fix SMTP connection test 2019-03-15 09:50:51 -04:00
theme_store DEV: Do not add -theme suffix to theme exports 2019-01-31 17:46:39 +00:00
validators FEATURE: Add site contact group. (#7152) 2019-03-13 11:34:47 +01:00
wizard FEATURE: add short_site_description setting to be included in title tag on homepage 2018-12-12 11:46:58 +01:00
admin_confirmation.rb
admin_constraint.rb FIX: Don't update User#last_seen_at when PG is readonly take 2. 2019-01-21 13:49:08 +08:00
admin_user_index_query.rb PERF: N+1 queries admin users pages. 2019-03-15 15:09:44 +08:00
age_words.rb
archetype.rb
auth.rb DEV: Introduce Auth::ManagedAuthenticator 2018-11-30 11:18:11 +00:00
avatar_lookup.rb UX: show full name on /latest page 2018-08-23 14:41:06 +05:30
badge_posts_view_manager.rb Extract badge_posts view management logic into a service object. 2018-09-03 09:51:35 +08:00
badge_queries.rb FEATURE: Add Wiki Editor badge. (#6511) 2018-10-19 15:30:27 +02:00
base62.rb remove constant warning in base62 file 2018-01-19 19:52:42 +01:00
browser_detection.rb FIX: Fix browser detection for Microsoft Edge. (#6516) 2018-10-22 23:15:41 +11:00
cache.rb FIX: Don't use Redis#keys in production. 2018-12-25 15:12:59 +02:00
canonical_url.rb
category_badge.rb FIX: avoid using absolute positioning for box category style in emails (#6607) 2018-11-15 14:35:50 +01:00
comment_migration.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
composer_messages_finder.rb FIX: Relative links in translations should work with subfolder 2018-11-08 23:31:05 +00:00
configurable_urls.rb
content_buffer.rb
content_security_policy.rb FEATURE: Calculate CSP based on active themes (#6976) 2019-02-11 12:32:04 +00:00
cooked_post_processor.rb UX: Lightbox support for image uploader. (#7034) 2019-02-21 10:13:37 +08:00
crawler_detection.rb FIX: cubot android devices were detected as crawlers 2018-06-21 10:56:46 +10:00
current_user.rb FIX: Do not check for suspicious login when impersonating. (#6534) 2018-11-12 15:34:12 +01:00
custom_renderer.rb
custom_setting_providers.rb
db_helper.rb PERF: new 'migrate_to_s3' rake task 2018-12-26 17:34:49 +01:00
directory_helper.rb
discourse_cookie_store.rb
discourse_diff.rb FIX: don't add diff classes more than once 2018-04-16 15:41:45 +02:00
discourse_event.rb
discourse_hub.rb DEV: Remove the use of stubs on Rails.logger in our test suite. 2018-10-10 09:34:50 +08:00
discourse_iife.rb
discourse_ip_info.rb FEATURE: adds security tab to dashboard (#6768) 2018-12-14 13:47:59 +01:00
discourse_logstash_logger.rb FIX: Incorrect formatter used when logstash formatter is enabled. 2018-04-17 12:07:52 +08:00
discourse_plugin_registry.rb DEV: Yarn-manage moment and moment-timezone libraries 2019-02-12 13:57:52 -05:00
discourse_plugin.rb
discourse_redis.rb Follow up to f6f2c38183. 2019-01-22 12:51:59 +08:00
discourse_tagging.rb FIX: Disable 'Create Topic' button if tag is staff-only. (#6984) 2019-03-12 19:23:36 +11:00
discourse_updates.rb DEV: Fix rubocop after update. 2019-01-02 05:47:29 +08:00
discourse.rb DEV: Prevent race condition when keeping site in readonly mode. 2019-02-20 10:01:18 +08:00
disk_space.rb FEATURE: Improve backup stats on admin dashboard 2018-12-17 11:35:11 +01:00
distributed_cache.rb REFACTOR: distributed_cache is moved to the message_bus gem 2018-10-15 15:01:45 -04:00
distributed_memoizer.rb DEV: Properly flush DistributedMemoizer in spec. 2019-02-21 15:17:37 +08:00
distributed_mutex.rb DEV: Prevent warning about already initialized constant 2019-02-28 21:57:20 +01:00
edit_rate_limiter.rb
email_backup_token.rb
email_cook.rb replace indentation with non-breaking spaces when cooking emails 2017-11-18 17:16:44 +01:00
email_updater.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
email.rb FEATURE: Include "via <site_name>" in email From header 2019-01-04 17:06:19 +01:00
encodings.rb Use rchardet instead of charlock_holmes gem 2018-08-01 10:41:20 +02:00
enum_site_setting.rb
enum.rb
excerpt_parser.rb FIX: Calculation of text length for <details> in excerpt was wrong 2018-03-12 16:55:23 +01:00
feed_element_installer.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
feed_item_accessor.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
file_helper.rb PERF: reduce workload when optimizing images 2019-01-09 12:28:18 +11:00
filter_best_posts.rb PERF: Remove Object#present? check introduced in e0d5d9670a. 2017-09-07 21:36:27 +08:00
final_destination.rb FIX: GET request didn't use headers 2019-03-08 21:36:49 +01:00
flag_query.rb Adjusts the minimum_flag_threshold for TL3/TL4 actions 2019-01-04 13:16:44 -05:00
flag_settings.rb Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
gaps.rb
global_path.rb FIX: Incorrect CDN URL for site setting uploads when s3 is enabled. 2019-01-04 07:52:13 +08:00
guardian.rb FIX: allow sending PMs to staff via flag even when PMs are disabled (#6938) 2019-01-24 16:56:59 +05:30
has_errors.rb
headless-ember.js
hijack.rb DEV: avoid require_dependency for some libs 2018-12-31 10:53:30 +11:00
homepage_constraint.rb FIX: Don't update User#last_seen_at when PG is readonly take 2. 2019-01-21 13:49:08 +08:00
html_prettify.rb Update Rubocop to 0.60 2018-12-04 10:48:16 +01:00
html_to_markdown.rb FIX: Font tag resulted in wrong email trimming 2018-12-18 11:40:54 +01:00
image_sizer.rb FIX: raise exception when getting dimensions of missing image 2018-12-03 10:19:49 -05:00
inline_oneboxer.rb FIX: Cache url data for failed inline oneboxes 2018-11-13 01:44:20 +05:30
introduction_updater.rb FIX: Wizard tries harder to find existing Welcome Topic 2018-12-06 10:27:22 +01:00
ip_addr.rb
js_locale_helper.rb FIX: missing translations when "en" set as fallbackLocale 2019-03-07 12:51:12 -05:00
json_error.rb FEATURE: Support backup uploads/downloads directly to/from S3. 2018-10-15 09:43:31 +08:00
letter_avatar.rb FIX: don't generate an exception when trying to cleanup unexisting tmp letter avatars 2018-05-30 15:33:58 +02:00
markdown_linker.rb FIX: subfolder digest emails have incorrect URLs 2018-08-07 16:38:17 -04:00
mem_info.rb
message_bus_diags.rb
method_profiler.rb FEATURE: Optional detailed performance logging for Sidekiq jobs (#7091) 2019-03-05 11:19:11 +00:00
mini_sql_multisite_connection.rb FEATURE: mini_sql upgrade 2019-02-25 16:02:32 +11:00
mobile_detection.rb FEATURE: add ability to clear previously set mobile_view with mobile_view=auto 2019-02-22 10:44:49 -08:00
new_post_manager.rb FIX: Don't enqueue topics if the user can't create them 2018-11-09 18:24:28 +01:00
new_post_result.rb
notification_levels.rb
oneboxer.rb DEV: assign constant to preserve_fragment_url_hosts 2018-12-19 17:37:39 +05:30
onpdiff.rb
pbkdf2.rb more prep work for jRuby 2018-02-26 10:25:58 +11:00
permalink_constraint.rb
pinned_check.rb
plain_text_to_markdown.rb FEATURE: convert plain text emails to markdown 2017-12-06 01:47:51 +01:00
plugin_gem.rb Override problematic .gemrc setting 2018-10-17 15:31:58 +11:00
post_action_creator.rb FIX: PostActionCreator was not checking the guardian properly 2019-01-31 14:48:42 -05:00
post_creator.rb FIX: Skip create_post_notice when importing 2019-03-15 13:48:35 +00:00
post_destroyer.rb FIX: post & topic destroyed hooks not triggering with tag filter 2019-03-06 22:52:54 +05:30
post_enqueuer.rb
post_jobs_enqueuer.rb FEATURE: Remove full quotes only from new posts. (#6862) 2019-01-17 13:24:32 +11:00
post_locker.rb FEATURE: Staff members can lock posts 2018-01-26 14:01:30 -05:00
post_merger.rb
post_revisor.rb FIX: Notify on tag change. (#7119) 2019-03-12 18:09:34 +01:00
pretty_text.rb Revert "FIX: Better emoji escaping for topic title" 2019-03-13 13:02:56 +01:00
primary_group_lookup.rb PERF: Remove N+1 query when generating posters summary. 2017-09-14 12:07:35 +08:00
promotion.rb FIX: Clarify User.group_locked_trust_level. 2018-11-07 10:27:44 +08:00
quote_comparer.rb FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter.rb correct return value 2018-04-25 08:44:07 +10:00
remap.rb REFACTOR: move remap out of script into a class 2018-08-15 12:37:52 -04:00
retrieve_title.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
route_format.rb FIX: RouteFormat is a better class name than RouteFormats 2017-12-21 15:30:32 -05:00
rtl.rb
s3_helper.rb FIX: Remove double quotes from etag value in API response 2019-02-08 14:31:19 +05:30
s3_inventory.rb Fix the build. 2019-03-13 17:39:07 +08:00
score_calculator.rb PERF: we have no use for topic percent rank 2018-07-05 15:10:19 +10:00
screening_model.rb
search.rb REFACTOR: Better variable name. 2019-03-13 15:23:01 +08:00
secure_session.rb
single_sign_on_provider.rb FIX: move sso provider into its own class so it doesn't interfere with sso client (#6767) 2018-12-19 10:22:10 +01:00
single_sign_on.rb FIX: move sso provider into its own class so it doesn't interfere with sso client (#6767) 2018-12-19 10:22:10 +01:00
site_setting_extension.rb FIX: Properly support defaults for upload site settings. 2019-03-13 16:36:57 +08:00
slug.rb FIX: strip emoji string from slug 2018-04-18 11:32:32 +05:30
socket_server.rb Improve error messaging in SocketServer. 2018-09-19 09:11:10 +08:00
source_url.rb
spam_handler.rb
sql_builder.rb DEV: remove all calls to SqlBuilder use DB.build instead 2018-06-20 17:53:49 +10:00
staff_constraint.rb FIX: Don't update User#last_seen_at when PG is readonly take 2. 2019-01-21 13:49:08 +08:00
staff_message_format.rb More extensibility for custom silence/suspend messages 2018-01-19 11:35:19 -05:00
stats_socket.rb
suggested_topics_builder.rb tweaks to related message list generation 2018-10-29 16:09:58 +11:00
system_message.rb FEATURE: Add site contact group. (#7152) 2019-03-13 11:34:47 +01:00
text_cleaner.rb FIX: strip invalid byte sequences 2019-02-26 10:09:51 +01:00
text_sentinel.rb rename 'min_private_message_{post/title}_length' to 'min_personal_message_{post/title}_length' 2018-02-01 13:25:29 +05:30
theme_javascript_compiler.rb FIX: Prevent duplicate params for raw template theme handlebars helpers 2019-02-08 12:54:00 +00:00
theme_settings_manager.rb FEATURE: Allow string theme settings to display with multiple lines 2019-02-05 14:14:53 +00:00
theme_settings_parser.rb FEATURE: Allow string theme settings to display with multiple lines 2019-02-05 14:14:53 +00:00
theme_translation_manager.rb FEATURE: Support for localized themes (#6848) 2019-01-17 11:46:11 +00:00
theme_translation_parser.rb FIX: Circular argument reference 2019-01-25 17:44:02 +00:00
timeline_lookup.rb PERF: Don't pluck all the columns just to retrieve a single value. 2018-06-27 11:41:35 +08:00
topic_creator.rb fix the build 2019-01-24 17:22:17 +05:30
topic_list_responder.rb
topic_publisher.rb FIX: Update last_version_at when publishing 2018-03-26 16:06:20 -04:00
topic_query_sql.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
topic_query.rb FIX: remove slow platform detection from server side 2018-12-13 13:57:05 +11:00
topic_retriever.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_subtype.rb
topic_view.rb FEATURE: Special call-out for new / returning posters. (#7115) 2019-03-08 10:48:35 +02:00
topics_bulk_action.rb FIX: Bulk deleting topics should ignore already deleted topics 2018-08-14 16:37:52 +02:00
trust_level.rb
twitter_api.rb FIX: allow Twitter videos to go fullscreen 2018-07-19 10:22:36 +05:30
unread.rb
upload_creator.rb FEATURE: support custom icons in themes (#7155) 2019-03-15 17:16:15 +11:00
upload_fixer.rb typo in error message 2018-08-10 11:34:01 +10:00
upload_recovery.rb Fix UploadRecovery from S3 fails with bucket name containing sub-folder. 2018-10-01 19:03:02 +08:00
url_helper.rb FIX: ensure local images use local CDN when uploads are stored on S3 2019-02-20 19:24:38 +01:00
user_name_suggester.rb FIX: don't raise an error on integer usernames 2018-09-10 22:17:56 +05:30
version.rb Version bump to v2.3.0.beta5 2019-03-13 16:47:23 -03:00
wizard.rb