Skip to content

Conversation

@LukasHirt
Copy link
Collaborator

Description

Fallback to original ID if decoding the external share ID fails.

Motivation and Context

ID can be also a plain string instead of base64 encoded string.

How Has This Been Tested?

  • test environment: macos, chrome
  • test case 1: run oCIS using romanperekhod/ocis-ocm:dev image, create a federated share and open shares

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Fallback to original ID if decoding the external share ID fails.
@LukasHirt LukasHirt requested review from Copilot and mzner October 29, 2025 10:03
@LukasHirt LukasHirt self-assigned this Oct 29, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds error handling for external share ID decoding failures by implementing a fallback mechanism that uses the original ID when base64 decoding fails.

  • Wrapped atob() call in try-catch block to handle decoding errors gracefully
  • Added test coverage for the fallback scenario with a non-base64-encoded ID
  • Documented the bugfix in the changelog

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/web-app-files/src/components/SideBar/Shares/Collaborators/ListItem.vue Added try-catch block around atob() to fallback to original ID on decoding failure
packages/web-app-files/tests/unit/components/SideBar/Shares/Collaborators/ListItem.spec.ts Added test case verifying fallback behavior when decoding fails
changelog/unreleased/bugfix-external-share-id-fallback.md Added changelog entry documenting the bugfix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

@LukasHirt LukasHirt enabled auto-merge October 29, 2025 10:16
@LukasHirt LukasHirt merged commit 31675ea into master Oct 30, 2025
10 checks passed
@LukasHirt LukasHirt deleted the fix/external-share-id branch October 30, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants