diff --git a/GreenshotPlugin/Controls/OAuthLoginForm.cs b/GreenshotPlugin/Controls/OAuthLoginForm.cs
index 9c9bcf68d..3f370b543 100644
--- a/GreenshotPlugin/Controls/OAuthLoginForm.cs
+++ b/GreenshotPlugin/Controls/OAuthLoginForm.cs
@@ -29,25 +29,22 @@ namespace GreenshotPlugin.Controls {
///
/// The OAuthLoginForm is used to allow the user to authorize Greenshot with an "Oauth" application
///
- public partial class OAuthLoginForm : Form {
+ public sealed partial class OAuthLoginForm : Form {
private static readonly ILog LOG = LogManager.GetLogger(typeof(OAuthLoginForm));
private readonly string _callbackUrl;
private IDictionary _callbackParameters;
- public IDictionary CallbackParameters {
- get {
- return _callbackParameters;
- }
- }
-
- public bool IsOk {
- get {
- return DialogResult == DialogResult.OK;
- }
- }
-
+ public IDictionary CallbackParameters => _callbackParameters;
+
+ public bool IsOk => DialogResult == DialogResult.OK;
+
public OAuthLoginForm(string browserTitle, Size size, string authorizationLink, string callbackUrl) {
_callbackUrl = callbackUrl;
+ // Fix for BUG-2071
+ if (callbackUrl.EndsWith("/"))
+ {
+ _callbackUrl = callbackUrl.Substring(0, callbackUrl.Length - 1);
+ }
InitializeComponent();
ClientSize = size;
Icon = GreenshotResources.getGreenshotIcon();