-
Notifications
You must be signed in to change notification settings - Fork 187
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
Name of public link is empty and not "Public link" when not specified in the create request #1237
Comments
can confirm still happens in the current master. |
checked with a version oCIS 1.11.0: There are 3 links in the screenshot: The problem is that the web does not fill in the default field "name" as it does in the OC10 |
That is low bug but it blocks UI test that we are running 2 years every day in web CI and ocis CI(because has tag smokeTest) I suggest some solutions:
@individual-it @pascalwengerter what do you think about? |
If that is easy to fix I would prefer to fix the issue |
This is a capability which needs to be set, opening a PR in a second |
Reopening as it's still reproducible in current master curl -vk -X POST https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares -u admin:admin -d "permission=31&path=test.txt&shareType=3" | xmllint --format -
Note: Unnecessary use of -X or --request, POST is already inferred.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:9200...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [835 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: O=Acme Corp; CN=OCIS
* start date: May 23 08:10:51 2022 GMT
* expire date: May 23 08:10:51 2023 GMT
* issuer: O=Acme Corp; CN=OCIS
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Server auth using Basic with user 'admin'
} [5 bytes data]
> POST /ocs/v1.php/apps/files_sharing/api/v1/shares HTTP/1.1
> Host: localhost:9200
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Length: 39
> Content-Type: application/x-www-form-urlencoded
>
} [39 bytes data]
* upload completely sent off: 39 out of 39 bytes
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [130 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 1307
< Content-Type: text/xml; charset=utf-8
< Date: Mon, 23 May 2022 08:17:24 GMT
< Ocs-Api-Version: 1
< Vary: Origin
<
{ [1035 bytes data]
100 1346 100 1307 100 39 18671 557 --:--:-- --:--:-- --:--:-- 19228
* Connection #0 to host localhost left intact
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message>OK</message>
</meta>
<data>
<id>NOrpePcySKhOFDL</id>
<share_type>3</share_type>
<uid_owner>admin</uid_owner>
<displayname_owner>Admin</displayname_owner>
<additional_info_owner>[email protected]</additional_info_owner>
<permissions>1</permissions>
<stime>1653293844</stime>
<parent/>
<expiration/>
<token>zFpfTrYcEQZhJJB</token>
<uid_file_owner>admin</uid_file_owner>
<displayname_file_owner>Admin</displayname_file_owner>
<additional_info_file_owner>[email protected]</additional_info_file_owner>
<state>0</state>
<path>/test.txt</path>
<item_type>file</item_type>
<mimetype>text/plain</mimetype>
<storage_id>shared::/test.txt</storage_id>
<storage>0</storage>
<item_source>1284d238-aa92-42ce-bdc4-0b0000009157$a89a7294-887b-4ab6-8314-37b324fafcb3!5228a30b-b943-4c9f-bf75-3ea73461c5f0</item_source>
<file_source>1284d238-aa92-42ce-bdc4-0b0000009157$a89a7294-887b-4ab6-8314-37b324fafcb3!5228a30b-b943-4c9f-bf75-3ea73461c5f0</file_source>
<file_parent/>
<file_target>/test.txt</file_target>
<share_with_user_type>0</share_with_user_type>
<share_with_additional_info/>
<mail_send>0</mail_send>
<name/>
<url>https://localhost:9200/s/zFpfTrYcEQZhJJB</url>
</data>
</ocs>
And the related tests are still in expected to fail ocis/tests/acceptance/expected-failures-webUI-on-OCIS-storage-ocisSmokeTest.md Lines 22 to 24 in cd87cae
ocis/tests/acceptance/expected-failures-webUI-on-OCIS-storage-ocisSmokeTest.md Lines 30 to 33 in cd87cae
|
Please note that the web UI part will be resolved via owncloud/web#6961 (filling that field client-side). What @SwikritiT shows perhaps needs some minor tweak to the link-creation in oCIS which needs to take the capability introduced in #3834 into account |
@kulmann could you take a look and potentially close this issue? (Just checked and I'm still assigned)
|
Doing the request via |
Steps to reproduce
webUI
bin/ocis server
. For details about the setup, check the sectionrun tests > with Ocis backend
https://owncloud.github.io/clients/web/testing/Here public link's name in my case is
EJYhMuvpVSBuXyZ
:Using api:
from ocis repo start phoenix
bin/ocis server
. For details about the setup, check the sectionrun tests > with Ocis backend
https://owncloud.github.io/clients/web/testing/upload a file or a folder
curl -X PUT http://localhost:9140/remote.php/webdav/hari.txt -d "123" -u user1:1234
curl -X PROPFIND http://localhost:9140/remote.php/webdav/hari.txt -u user1:1234 | xmllint --format -
curl -X POST http://localhost:9140/ocs/v1.php/apps/files_sharing/api/v1/shares -u user1:1234 -d "permission=31&path=hari.txt&shareType=3" | xmllint --format -
curl -X GET http://localhost:9140/ocs/v2.php/apps/files_sharing/api/v1/shares -u user1:1234 | xmllint --format -
Response:
Here as you can see
<name />
is empty.Expected Behavior
As you can see in above screen shot the name of public share is
Public link
using api
If you get the info of the last public share:
curl -X GET http://localhost/core2/ocs/v2.php/apps/files_sharing/api/v1/shares -u hari:admin | xmllint --format -
Response:
You can clearly see the name in response is
Public link
i.e.<name>Public link</name>
The text was updated successfully, but these errors were encountered: