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

File ids and other ids as strings #3214

Closed
PVince81 opened this issue Mar 20, 2020 · 2 comments · Fixed by #3248
Closed

File ids and other ids as strings #3214

PVince81 opened this issue Mar 20, 2020 · 2 comments · Fixed by #3248
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@PVince81
Copy link
Contributor

In OCIS file ids and other ids can be base64 strings instead of numbers.

This means we cannot use them in HTML ids or other places where we assume that they are simple numbers.

We should replace their usages with a different field, not sure which.
Maybe we can introduce a new "key" field that gets populated after loading the data and use that instead ?

@PVince81 PVince81 added Type:Bug Something isn't working Priority:p2-high Escalation, on top of current planning, release blocker labels Mar 20, 2020
@PVince81
Copy link
Contributor Author

PVince81 commented Mar 20, 2020

A few relevant occurrences I found:

apps/files/src/components/FilesLists/RowActionsDropdown.vue|4 col 54| :boundary="`#files-file-list-action-button-${item.id}-active`"
apps/files/src/components/FilesLists/RowActionsDropdown.vue|6 col 52| :toggle="`#files-file-list-action-button-${item.id}-active`"
apps/files/src/components/FileLinkSidebar.vue|273 col 49| return textUtils.naturalSortCompare(l1.id + '', l2.id + '')
apps/files/src/components/FileList.vue|34 col 170| <oc-grid :ref="index === 0 ? 'firstRow' : null" gutter="small" flex class="uk-padding-small oc-border-top" :class="_rowClasses(item)" :id="'file-row-' + item.id">
apps/files/src/components/FileList.vue|47 col 52| :id="actionsDropdownButtonId(item.id, active)"
apps/files/src/components/FileList.vue|188 col 45| this.$scrollTo(`#file-row-${file.id}`, 500, {
apps/files/src/components/AllFilesList.vue|211 col 45| this.$scrollTo(`#file-row-${file.id}`, 500, {

I've excluded the cases where ids are used in Vue's "key" attributes as I believe these should be safe as they can be arbitrary strings.

@PVince81
Copy link
Contributor Author

Fix is here #3248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant