Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(AdminSettings): hide secrets in password fields #12812

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/AdminSettings/RecordingServers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,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 @@ -84,7 +85,7 @@ import { t } from '@nextcloud/l10n'
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 @@ -106,7 +107,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 @@ -45,9 +45,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 @@ -88,9 +90,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 @@ -104,7 +106,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 @@ -54,9 +54,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 @@ -77,7 +78,7 @@ import { t } from '@nextcloud/l10n'
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 @@ -91,7 +92,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 @@ -29,8 +29,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 @@ -87,6 +88,7 @@ import Pulse from 'vue-material-design-icons/Pulse.vue'
import { t } from '@nextcloud/l10n'

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 @@ -107,6 +109,7 @@ export default {
NcButton,
NcSelect,
NcTextField,
NcPasswordField,
Pulse,
},

Expand Down
Loading