Compare commits
2 commits
develop
...
obfuscatio
Author | SHA1 | Date | |
---|---|---|---|
|
d02710d6e2 | ||
|
3f65a94be3 |
5 changed files with 47879 additions and 8681 deletions
38790
package-lock.json
generated
Normal file
38790
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -29,6 +29,7 @@
|
|||
"chromatism": "3.0.0",
|
||||
"click-outside-vue3": "4.0.1",
|
||||
"cropperjs": "1.5.12",
|
||||
"crypto-js": "^4.1.1",
|
||||
"diff": "3.5.0",
|
||||
"escape-html": "1.0.3",
|
||||
"js-cookie": "^3.0.1",
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
import { mapState } from 'vuex'
|
||||
import { get } from 'lodash'
|
||||
import sha256 from 'crypto-js/sha256'
|
||||
|
||||
/** Haven't checked admin-fe sorry */
|
||||
const OBFUSCATE = true
|
||||
|
||||
const obfuscate = (instance) => {
|
||||
const half = Math.floor(instance.length / 2)
|
||||
const fourth = Math.ceil(half / 2)
|
||||
const slices = instance.match(new RegExp(`(.{${fourth}})(.{${half}})(.*)`))
|
||||
slices[2] = slices[2].replace(/[^.]/g, '*')
|
||||
return slices.slice(1, 4).join('')
|
||||
}
|
||||
|
||||
/**
|
||||
* This is for backwards compatibility. We originally didn't recieve
|
||||
|
@ -9,10 +21,12 @@ import { get } from 'lodash'
|
|||
*/
|
||||
const toInstanceReasonObject = (instances, info, key) => {
|
||||
return instances.map(instance => {
|
||||
const censored = OBFUSCATE ? obfuscate(instance) : instance
|
||||
const crypt = sha256(instance).toString()
|
||||
if (info[key] && info[key][instance] && info[key][instance]['reason']) {
|
||||
return { instance: instance, reason: info[key][instance]['reason'] }
|
||||
return { instance: censored, reason: info[key][instance]['reason'], sha256: crypt }
|
||||
}
|
||||
return { instance: instance, reason: '' }
|
||||
return { instance: censored, reason: '', sha256: crypt }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,10 @@
|
|||
v-for="entry in rejectInstances"
|
||||
:key="entry.instance + '_reject'"
|
||||
>
|
||||
<td>{{ entry.instance }}</td>
|
||||
<td
|
||||
:title="entry.sha256"
|
||||
:aria-label="entry.sha256"
|
||||
>{{ entry.instance }}</td>
|
||||
<td v-if="entry.reason === ''">
|
||||
{{ $t("about.mrf.simple.not_applicable") }}
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue