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

Public links - missing error message when public link name is empty #7549

Closed
HanaGemela opened this issue Oct 23, 2019 · 6 comments · Fixed by #8546
Closed

Public links - missing error message when public link name is empty #7549

HanaGemela opened this issue Oct 23, 2019 · 6 comments · Fixed by #8546

Comments

@HanaGemela
Copy link
Contributor

Client: 2.6.0rc2 (build 12524)
Windows 10
Server: 10.3.0 stable

Steps to recreate:

  1. Create a new public link
  2. Delete its name
  3. Hit Enter -> now the link doesn't have a name, all looks OK and saved
  4. Create a new public link by clicking on the create button

Actual result: Link with empty name has been renamed back to its original name. So the name cannot be an empty string
Expected result: Nice error message

Screenshot 2019-10-23 at 16 40 41

@HanaGemela HanaGemela added type:bug p3-medium Normal priority labels Oct 23, 2019
@HanaGemela HanaGemela added this to the 2.6.1 milestone Oct 23, 2019
@michaelstingl
Copy link
Contributor

@HanaGemela does the server respond with an error message and we don't display it? Otherwise I'd move to server repo.

@HanaGemela
Copy link
Contributor Author

@michaelstingl no error from the server. When I remove the link name in web ui and save, it shows the default name. When I want to edit the link again in web ui, the link name is empty. It looks to me that the link name is the name specified by the user. And it can be empty when the user doesn't specify anything. That's absolutely ok. But in this case when there is no link name, the default name should be displayed.
So the expected result might be: When the link name is empty, show the default name

@guruz
Copy link
Contributor

guruz commented Oct 29, 2019

We could just deny requests client side that have no name?

@michaelstingl michaelstingl modified the milestones: 2.6.1, 2.6.2 Nov 26, 2019
@TheOneRing TheOneRing modified the milestones: 2.6.2, 2.8.0 Mar 17, 2021
@fmoc
Copy link
Contributor

fmoc commented Apr 8, 2021

I can reproduce the issue in the current master.

I'm not sure, however, that it's a good idea to just implement the implicit server-side behavior (i.e., the lack of an error message) client side, too. What if the server ever changes? In the end, the server should have the last word.

The easiest way to work around this issue is to actually send the request. If it doesn't produce an error (but, really, it should), we then fetch the list from the server again, as it seems to be done when a new link is created. This way, we should stay in sync with the server's state.

@fmoc
Copy link
Contributor

fmoc commented Apr 8, 2021

Actual result: Link with empty name has been renamed back to its original name. So the name cannot be an empty string

"Original" is the wrong term. I made some tests with custom names, and this behavior seems intentional. The server just returns the unique ID as a tag if no custom name has been assigned. This can be observed in the web UI as well.

Refreshing the shares when the name of one entry is changed fixes the issue, as items with an "empty" name are updated ASAP with the share ID. I'm preparing a PR that implements this behavior.

@jnweiger
Copy link
Contributor

jnweiger commented Aug 24, 2021

Confirmed fixed in testpilotcloud client 2.9.0 beta3

Behaviour on windows 10:

  • remove the public link name before hitting the Create button.
  • A random character string is used as the name.
  • No error messages seen.
  • remove the name at the server's WEB UI, save -> a random string is used again instead of the empty string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants