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

Smtp auth failure when sharing a file does not update the sharing list #8608

Closed
skjnldsv opened this issue Mar 1, 2018 · 4 comments
Closed

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Mar 1, 2018

Steps to reproduce

  1. have an invalid php email set in the additional settings
  2. share a directory with a user

Expected behaviour

  • The sharing list is immediately updated and an error message is shown saying 'share added but there was an issue sending the mail'

Actual behaviour

  • Loading icon during 15 sec
  • Error saying no mail has been sent
  • Shares list not updated despite the fact that the share has been set

Server configuration

Operating system: Arch

Web server: Nginx

Database: mariadb

PHP version: 7.2

Nextcloud version: 13

Updated from an older Nextcloud/ownCloud or fresh install: updated

Request log:
{"ocs":{"meta":{"status":"failure","statuscode":403,"message":"Failed to authenticate on SMTP server with username \"[email protected]\" using 1 possible authenticators"},"data":[]}}

@skjnldsv skjnldsv added bug design Design, UI, UX, etc. 1. to develop Accepted and waiting to be taken care of medium feature: sharing labels Mar 1, 2018
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@MorrisJobke
Copy link
Member

We shouldn't leak this via our API 🙈 cc @rullzer @nickvergessen

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Mar 25, 2019
@MorrisJobke
Copy link
Member

@ChristophWurst

@nickvergessen
Copy link
Member

For me the API returns 'Failed to send share by mail'
The named message is only in the logs, which I think is fine.
Relevant code:

try {
$link = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.showShare',
['token' => $share->getToken()]);
$this->sendMailNotification(
$share->getNode()->getName(),
$link,
$share->getSharedBy(),
$share->getSharedWith(),
$share->getExpirationDate()
);
} catch (HintException $hintException) {
$this->logger->logException($hintException, [
'message' => 'Failed to send share by mail.',
'level' => ILogger::ERROR,
'app' => 'sharebymail',
]);
$this->removeShareFromTable($shareId);
throw $hintException;
} catch (\Exception $e) {
$this->logger->logException($e, [
'message' => 'Failed to send share by mail.',
'level' => ILogger::ERROR,
'app' => 'sharebymail',
]);
$this->removeShareFromTable($shareId);
throw new HintException('Failed to send share by mail',
$this->l->t('Failed to send share by email'));
}

@nickvergessen
Copy link
Member

Code is also like this in stable13+ so I'm closing this one year old issue.
Feel free to reopen when you have other steps to reproduce

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

No branches or pull requests

4 participants