mirror of
https://github.com/Luzifer/ots.git
synced 2024-10-01 01:06:09 -04:00
Remove option to disable encryption
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1d84f122ac
commit
79595ad2a6
@ -3,9 +3,8 @@ securePassword = null
|
|||||||
createSecret = () ->
|
createSecret = () ->
|
||||||
secret = $('#formCreateSecret').find('textarea').val()
|
secret = $('#formCreateSecret').find('textarea').val()
|
||||||
|
|
||||||
if $('#extra').prop 'checked'
|
securePassword = Math.random().toString(36).substring(2)
|
||||||
securePassword = Math.random().toString(36).substring(2)
|
secret = GibberishAES.enc(secret, securePassword)
|
||||||
secret = GibberishAES.enc(secret, securePassword)
|
|
||||||
|
|
||||||
$.ajax 'api/create',
|
$.ajax 'api/create',
|
||||||
data:
|
data:
|
||||||
|
@ -7,10 +7,8 @@
|
|||||||
createSecret = function() {
|
createSecret = function() {
|
||||||
var secret;
|
var secret;
|
||||||
secret = $('#formCreateSecret').find('textarea').val();
|
secret = $('#formCreateSecret').find('textarea').val();
|
||||||
if ($('#extra').prop('checked')) {
|
securePassword = Math.random().toString(36).substring(2);
|
||||||
securePassword = Math.random().toString(36).substring(2);
|
secret = GibberishAES.enc(secret, securePassword);
|
||||||
secret = GibberishAES.enc(secret, securePassword);
|
|
||||||
}
|
|
||||||
$.ajax('api/create', {
|
$.ajax('api/create', {
|
||||||
data: {
|
data: {
|
||||||
secret: secret
|
secret: secret
|
||||||
|
@ -83,10 +83,6 @@
|
|||||||
<label for="secret">Secret data:</label>
|
<label for="secret">Secret data:</label>
|
||||||
<textarea class="form-control" rows="5" id="secret"></textarea>
|
<textarea class="form-control" rows="5" id="secret"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<input type="checkbox" name="extra-secure" id="extra" checked>
|
|
||||||
<label for="extra">Make it extra secure (encrypt it before sending to the server)</label>
|
|
||||||
</div>
|
|
||||||
<input class="btn btn-success" type="submit" value="Create the secret!">
|
<input class="btn btn-success" type="submit" value="Create the secret!">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user