improve userID entropy

This commit is contained in:
Kevin F 2022-11-22 03:10:38 +00:00
parent 26b6b68165
commit 06376cfd66
2 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ __ __ _____ __ __ _____
<input type="password" v-model="userIDInput" placeholder="Enter your account ID" required> <input type="password" v-model="userIDInput" placeholder="Enter your account ID" required>
<button @submit.prevent="onSubmit" @click="userID = userIDInput; userLogin()">Login</button> <button @submit.prevent="onSubmit" @click="userID = userIDInput; userLogin()">Login</button>
<button @submit.prevent="onSubmit" @click="userID = crypto.randomUUID(); userLogin()">Generate Account</button> <button @submit.prevent="onSubmit" @click="userID = (window.crypto.randomUUID().substring(6) + window.crypto.randomUUID().substring(30)).replaceAll('-',''); userLogin()">Generate Account</button>
</form> </form>
</div> </div>
<br><br> <br><br>

View File

@ -271,7 +271,11 @@ let app = createApp({
} }
}, },
mounted() { mounted() {
// do this to get a connection to the backend so we don't have to wait for DNS later // do this to get a connection to the backend so we don't have to wait for DNS later
if (document.location.hostname.endsWith(".onion")){
this.backend = "http://api.xmr4smsoncunkfgfjr6xmxl57afsmuu6rg2bwuysbgg4wdtoawamwxad.onion/"
}
fetch(this.backend + 'ping') fetch(this.backend + 'ping')
this.getThreads(true) this.getThreads(true)
setInterval(()=>{ setInterval(()=>{
@ -280,9 +284,6 @@ let app = createApp({
setInterval(()=>{ setInterval(()=>{
this.getCredits() this.getCredits()
}, 30000) }, 30000)
if (document.location.hostname.endsWith(".onion")){
this.backend = "http://api.xmr4smsoncunkfgfjr6xmxl57afsmuu6rg2bwuysbgg4wdtoawamwxad.onion/"
}
} }
}) })