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(oauth): instance name encoding on oauth app in admin #49804

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
02a6eb4
bug: moved instance name out of l10n to fix issue with instance name …
byt3sage Dec 11, 2024
91a399e
chore: formatting
byt3sage Dec 11, 2024
5321597
Merge branch 'master' into bug/oauth-instance-name-decoding-39956
byt3sage Dec 11, 2024
cfafc3c
chore: reverted language files
byt3sage Dec 13, 2024
4c57f0b
Merge branch 'master' of github.com:byt3sage/server into bug/oauth-in…
byt3sage Dec 13, 2024
8bfe048
Merge branch 'bug/oauth-instance-name-decoding-39956' of github.com:b…
byt3sage Dec 13, 2024
ce6e450
Merge branch 'master' into bug/oauth-instance-name-decoding-39956
byt3sage Dec 13, 2024
4cd8a48
Merge branch 'bug/oauth-instance-name-decoding-39956' of github.com:b…
byt3sage Dec 13, 2024
7a9eb28
Merge branch 'bug/oauth-instance-name-decoding-39956' of github.com:b…
byt3sage Dec 13, 2024
d766b71
chore: formatting
byt3sage Dec 11, 2024
f259cbc
chore: reverted language files
byt3sage Dec 13, 2024
4f8eec1
fix: Fix ServiceWorker scope when Nextcloud installed in subfolder
Koc Dec 6, 2024
6ce16a9
chore(assets): Recompile assets
nextcloud-command Dec 6, 2024
f4993a6
chore: cleanup leftover debug statement
icewind1991 Dec 9, 2024
ab6bd5e
fix(files): throttle favorite with max 5 simultaneous requests
skjnldsv Dec 11, 2024
7d2508a
chore(assets): Recompile assets
nextcloud-command Dec 11, 2024
810a5bc
fix(files_sharing): Correct property enforced property names
nfebe Dec 11, 2024
1ac6a3a
chore(assets): Recompile assets
nextcloud-command Dec 11, 2024
f37a39c
Fix(l10n): Update translations from Transifex
nextcloud-bot Dec 12, 2024
0f464f8
fix(files_sharing): also submit new share on password submit
skjnldsv Dec 12, 2024
9687bb8
chore(assets): Recompile assets
nextcloud-command Dec 12, 2024
1690451
fix(dav): add activity logging for favorites in dav
grnd-alt Oct 24, 2024
9e18dbd
refactor(tags): move favorite event dispatching to tags.php
grnd-alt Nov 18, 2024
0443c66
fix(tests): remove redundant unit test for activity
grnd-alt Dec 3, 2024
931eb36
fix(files_sharing): Do not wrap password policy exception into a gene…
come-nc Nov 19, 2024
a230b74
fix(shares): Wrap exceptions from password validation to set code to 400
come-nc Dec 10, 2024
fe8c429
fix(tests): Adapt ManagerTest to change in Exception class used
come-nc Dec 10, 2024
4db03fc
fix: don't recalculate folder size in Cache::delete if the entry didn…
icewind1991 Aug 20, 2024
01bb204
feat(files): Right-align list actions
Pytal Dec 11, 2024
699abbb
feat(trashbin): Allow emptying trash
Pytal Dec 11, 2024
2eb7c31
fix(files_trashbin): update @nextcloud/files and adjust api + l10n fix
skjnldsv Dec 12, 2024
affe220
fix(files): protect filelist actions with try...catch
skjnldsv Dec 12, 2024
8f01172
feat(files_trashbin): add cypress tests
skjnldsv Dec 12, 2024
89d71d7
perf(files_trashbin): use empty trashbin endpoint instead of batch de…
skjnldsv Dec 12, 2024
6790fe7
feat(files_trashbin): improve wordings
skjnldsv Dec 12, 2024
c77f57f
fix(trashbin): Fix infinitely loading empty trash action on close
Pytal Dec 12, 2024
b73b62c
chore: compile assets
Pytal Dec 12, 2024
53905e7
chore(psalm): Update baseline
Pytal Dec 12, 2024
a6e54da
fix: handle calling select on partitioned queries with an array of co…
icewind1991 Dec 12, 2024
0a58000
fix: improve logic for ensuring join columns are selected for partiti…
icewind1991 Dec 12, 2024
a37e715
feat(dashboard): wish happy birthday
kesselb Dec 9, 2024
ab6e5b0
chore(deps): bump nanoid from 3.3.7 to 3.3.8
dependabot[bot] Dec 12, 2024
9eb8ab4
chore(assets): Recompile assets
nextcloud-command Dec 12, 2024
0c49e36
Fix(l10n): Update translations from Transifex
nextcloud-bot Dec 13, 2024
77ca4f5
Merge branch 'bug/oauth-instance-name-decoding-39956' of github.com:b…
byt3sage Dec 13, 2024
c9ffff9
Merge branch 'master' into bug/oauth-instance-name-decoding-39956
byt3sage Dec 13, 2024
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
101 changes: 57 additions & 44 deletions apps/oauth2/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@
-->
<template>
<NcSettingsSection :name="t('oauth2', 'OAuth 2.0 clients')"
:description="t('oauth2', 'OAuth 2.0 allows external services to request access to {instanceName}.', { instanceName })"
:description="`${t(
'oauth2',
'OAuth 2.0 allows external services to request access to'
)} ${instanceName} .
`"
:doc-url="oauthDocLink">
<table v-if="clients.length > 0" class="grid">
<thead>
<tr>
<th>
{{ t('oauth2', 'Name') }}
{{ t("oauth2", "Name") }}
</th>
<th>
{{ t('oauth2', 'Redirection URI') }}
{{ t("oauth2", "Redirection URI") }}
</th>
<th>
{{ t('oauth2', 'Client Identifier') }}
{{ t("oauth2", "Client Identifier") }}
</th>
<th>
{{ t('oauth2', 'Secret key') }}
{{ t("oauth2", "Secret key") }}
</th>
<th>
{{ t('oauth2', 'Delete client') }}
{{ t("oauth2", "Delete client") }}
</th>
</tr>
</thead>
Expand All @@ -33,14 +37,20 @@
@delete="deleteClient" />
</tbody>
</table>
<NcNoteCard v-if="showSecretWarning"
type="warning">
{{ t('oauth2', 'Make sure you store the secret key, it cannot be recovered.') }}
<NcNoteCard v-if="showSecretWarning" type="warning">
{{
t(
"oauth2",
"Make sure you store the secret key, it cannot be recovered."
)
}}
</NcNoteCard>

<br>
<h3>{{ t('oauth2', 'Add client') }}</h3>
<span v-if="newClient.error" class="msg error">{{ newClient.errorMsg }}</span>
<h3>{{ t("oauth2", "Add client") }}</h3>
<span v-if="newClient.error" class="msg error">{{
newClient.errorMsg
}}</span>
<form class="oauth2-form" @submit.prevent="addClient">
<NcTextField id="name"
:value.sync="newClient.name"
Expand All @@ -57,7 +67,7 @@
:label="t('oauth2', 'Redirection URI')"
:placeholder="t('oauth2', 'Redirection URI')" />
<NcButton native-type="submit" class="inline-button">
{{ t('oauth2', 'Add') }}
{{ t("oauth2", "Add") }}
</NcButton>
</form>
</NcSettingsSection>
Expand Down Expand Up @@ -108,54 +118,57 @@ export default {
},
methods: {
deleteClient(id) {
axios.delete(generateUrl('apps/oauth2/clients/{id}', { id }))
axios
.delete(generateUrl('apps/oauth2/clients/{id}', { id }))
.then(() => {
// eslint-disable-next-line vue/no-mutating-props
this.clients = this.clients.filter(client => client.id !== id)
this.clients = this.clients.filter(
(client) => client.id !== id,
)
})
},
addClient() {
this.newClient.error = false

axios.post(
generateUrl('apps/oauth2/clients'),
{
axios
.post(generateUrl('apps/oauth2/clients'), {
name: this.newClient.name,
redirectUri: this.newClient.redirectUri,
},
).then(response => {
// eslint-disable-next-line vue/no-mutating-props
this.clients.push(response.data)
this.showSecretWarning = true
})
.then((response) => {
// eslint-disable-next-line vue/no-mutating-props
this.clients.push(response.data)
this.showSecretWarning = true

this.newClient.name = ''
this.newClient.redirectUri = ''
}).catch(reason => {
this.newClient.error = true
this.newClient.errorMsg = reason.response.data.message
})
this.newClient.name = ''
this.newClient.redirectUri = ''
})
.catch((reason) => {
this.newClient.error = true
this.newClient.errorMsg = reason.response.data.message
})
},
},
}
</script>
<style scoped>
table {
max-width: 800px;
}
table {
max-width: 800px;
}

/** Overwrite button height and position to be aligned with the text input */
.inline-button {
min-height: 34px !important;
display: inline-flex !important;
}
/** Overwrite button height and position to be aligned with the text input */
.inline-button {
min-height: 34px !important;
display: inline-flex !important;
}

.oauth2-form {
display: flex;
flex-direction: row;
}
.oauth2-form {
display: flex;
flex-direction: row;
}

.oauth2-form--input {
max-width: 200px;
margin-inline-end: 10px;
}
.oauth2-form--input {
max-width: 200px;
margin-inline-end: 10px;
}
</style>