Skip to content

Commit

Permalink
Merge pull request #12842 from nextcloud/backport/12812/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(AdminSettings): hide secrets in password fields
  • Loading branch information
ShGKme authored Jul 29, 2024
2 parents 48d1b39 + b1384de commit 0219da8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
7 changes: 4 additions & 3 deletions src/components/AdminSettings/RecordingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@
{{ t('spreed', 'Add a new recording backend server') }}
</NcButton>

<NcTextField class="form__textfield additional-top-margin"
<NcPasswordField class="form__textfield additional-top-margin"
:value="secret"
name="recording_secret"
autocomplete="new-password"
:disabled="loading"
:placeholder="t('spreed', 'Shared secret')"
:label="t('spreed', 'Shared secret')"
Expand Down Expand Up @@ -101,7 +102,7 @@ import { loadState } from '@nextcloud/initial-state'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'

import RecordingServer from '../../components/AdminSettings/RecordingServer.vue'
import TransitionWrapper from '../UIShared/TransitionWrapper.vue'
Expand All @@ -122,7 +123,7 @@ export default {
NcButton,
NcCheckboxRadioSwitch,
NcNoteCard,
NcTextField,
NcPasswordField,
Plus,
RecordingServer,
TransitionWrapper,
Expand Down
8 changes: 5 additions & 3 deletions src/components/AdminSettings/SIPBridge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@
<label for="sip-shared-secret" class="form__label additional-top-margin">
{{ t('spreed', 'Shared secret') }}
</label>
<NcTextField id="sip-shared-secret"
<NcPasswordField id="sip-shared-secret"
:value.sync="sharedSecret"
class="form"
name="sip-shared-secret"
autocomplete="new-password"
:disabled="loading"
:placeholder="t('spreed', 'Shared secret')"
label-outside />
Expand Down Expand Up @@ -104,9 +106,9 @@ import { generateOcsUrl } from '@nextcloud/router'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import NcTextArea from '@nextcloud/vue/dist/Components/NcTextArea.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'

import { setSIPSettings } from '../../services/settingsService.js'
import { getWelcomeMessage } from '../../services/signalingService.js'
Expand All @@ -120,7 +122,7 @@ export default {
NcNoteCard,
NcSelect,
NcTextArea,
NcTextField,
NcPasswordField,
},

data() {
Expand Down
7 changes: 4 additions & 3 deletions src/components/AdminSettings/SignalingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@
</NcCheckboxRadioSwitch>
</template>

<NcTextField class="form__textfield additional-top-margin"
<NcPasswordField class="form__textfield additional-top-margin"
:value="secret"
name="signaling_secret"
autocomplete="new-password"
:disabled="loading"
:placeholder="t('spreed', 'Shared secret')"
:label="t('spreed', 'Shared secret')"
Expand All @@ -93,7 +94,7 @@ import { loadState } from '@nextcloud/initial-state'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'

import SignalingServer from '../../components/AdminSettings/SignalingServer.vue'
import TransitionWrapper from '../UIShared/TransitionWrapper.vue'
Expand All @@ -107,7 +108,7 @@ export default {
NcButton,
NcCheckboxRadioSwitch,
NcNoteCard,
NcTextField,
NcPasswordField,
Plus,
SignalingServer,
TransitionWrapper,
Expand Down
5 changes: 4 additions & 1 deletion src/components/AdminSettings/TurnServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
:label="t('spreed', 'TURN server URL')"
@update:value="updateServer" />

<NcTextField ref="turn_secret"
<NcPasswordField ref="turn_secret"
name="turn_secret"
autocomplete="new-password"
placeholder="secret"
class="turn-server__textfield"
:value="secret"
Expand Down Expand Up @@ -102,6 +103,7 @@ import Delete from 'vue-material-design-icons/Delete.vue'
import Pulse from 'vue-material-design-icons/Pulse.vue'

import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import NcPasswordField from '@nextcloud/vue/dist/Components/NcPasswordField.js'
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js'
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js'
Expand All @@ -122,6 +124,7 @@ export default {
NcButton,
NcSelect,
NcTextField,
NcPasswordField,
Pulse,
},

Expand Down

0 comments on commit 0219da8

Please sign in to comment.