mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Encrypt all text uploader settings
This commit is contained in:
parent
1c2abb9b95
commit
db38dd6797
3 changed files with 21 additions and 16 deletions
|
@ -41,7 +41,7 @@ public OAuth2Info(string client_id, string client_secret)
|
|||
public static bool CheckOAuth(OAuth2Info oauth)
|
||||
{
|
||||
return oauth != null && !string.IsNullOrEmpty(oauth.Client_ID) && !string.IsNullOrEmpty(oauth.Client_Secret) &&
|
||||
oauth.Token != null && !string.IsNullOrEmpty(oauth.Token.access_token);
|
||||
oauth.Token != null && !string.IsNullOrEmpty(oauth.Token.access_token);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -496,11 +496,13 @@ public override string ToString()
|
|||
public class PastebinSettings
|
||||
{
|
||||
public string Username { get; set; }
|
||||
[JsonEncrypt]
|
||||
public string Password { get; set; }
|
||||
public PastebinPrivacy Exposure { get; set; } = PastebinPrivacy.Unlisted;
|
||||
public PastebinExpiration Expiration { get; set; } = PastebinExpiration.N;
|
||||
public string Title { get; set; }
|
||||
public string TextFormat { get; set; } = "text";
|
||||
[JsonEncrypt]
|
||||
public string UserKey { get; set; }
|
||||
public bool RawURL { get; set; }
|
||||
}
|
||||
|
|
|
@ -99,51 +99,54 @@ public class UploadersConfig : SettingsBase<UploadersConfig>
|
|||
|
||||
#region Pastebin
|
||||
|
||||
public PastebinSettings PastebinSettings = new PastebinSettings();
|
||||
public PastebinSettings PastebinSettings { get; set; } = new PastebinSettings();
|
||||
|
||||
#endregion Pastebin
|
||||
|
||||
#region Paste.ee
|
||||
|
||||
public string Paste_eeUserKey = "";
|
||||
public bool Paste_eeEncryptPaste = false;
|
||||
[JsonEncrypt]
|
||||
public string Paste_eeUserKey { get; set; } = "";
|
||||
public bool Paste_eeEncryptPaste { get; set; } = false;
|
||||
|
||||
#endregion Paste.ee
|
||||
|
||||
#region Gist
|
||||
|
||||
public OAuth2Info GistOAuth2Info = null;
|
||||
public bool GistPublishPublic = false;
|
||||
public bool GistRawURL = false;
|
||||
public string GistCustomURL = "";
|
||||
public OAuth2Info GistOAuth2Info { get; set; } = null;
|
||||
public bool GistPublishPublic { get; set; } = false;
|
||||
public bool GistRawURL { get; set; } = false;
|
||||
public string GistCustomURL { get; set; } = "";
|
||||
|
||||
#endregion Gist
|
||||
|
||||
#region uPaste
|
||||
|
||||
public string UpasteUserKey = "";
|
||||
public bool UpasteIsPublic = false;
|
||||
[JsonEncrypt]
|
||||
public string UpasteUserKey { get; set; } = "";
|
||||
public bool UpasteIsPublic { get; set; } = false;
|
||||
|
||||
#endregion uPaste
|
||||
|
||||
#region Hastebin
|
||||
|
||||
public string HastebinCustomDomain = "https://hastebin.com";
|
||||
public string HastebinSyntaxHighlighting = "hs";
|
||||
public bool HastebinUseFileExtension = true;
|
||||
public string HastebinCustomDomain { get; set; } = "https://hastebin.com";
|
||||
public string HastebinSyntaxHighlighting { get; set; } = "hs";
|
||||
public bool HastebinUseFileExtension { get; set; } = true;
|
||||
|
||||
#endregion Hastebin
|
||||
|
||||
#region OneTimeSecret
|
||||
|
||||
public string OneTimeSecretAPIKey = "";
|
||||
public string OneTimeSecretAPIUsername = "";
|
||||
public string OneTimeSecretAPIUsername { get; set; } = "";
|
||||
[JsonEncrypt]
|
||||
public string OneTimeSecretAPIKey { get; set; } = "";
|
||||
|
||||
#endregion OneTimeSecret
|
||||
|
||||
#region Pastie
|
||||
|
||||
public bool PastieIsPublic = false;
|
||||
public bool PastieIsPublic { get; set; } = false;
|
||||
|
||||
#endregion Pastie
|
||||
|
||||
|
|
Loading…
Reference in a new issue