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

changed File on Upload not visible (only with scan --all) #12093

Closed
tom-lp-at opened this issue Oct 28, 2018 · 4 comments
Closed

changed File on Upload not visible (only with scan --all) #12093

tom-lp-at opened this issue Oct 28, 2018 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: filesystem

Comments

@tom-lp-at
Copy link

Steps to reproduce

  1. upload a pdf-file
  2. digitale sign of the file
  3. change the signed file with the original
  4. open the uploaded file
  5. its the original uploaded File

Expected behaviour

see instant the signed PDF

Actual behaviour

see the uploaded PDF (without signature)

Server configuration

Operating system:
Centos 7
Web server:
NGINX 1.14.0
Database:
MariaDB 5.5.60
PHP version:
7.2.11
Nextcloud version: (see Nextcloud admin page)
14.0.3
Updated from an older Nextcloud/ownCloud or fresh install:
updated from 14.0.0
Where did you install Nextcloud from:
download tar from nextcloud
Signing status:

Signing status No errors have been found.

List of activated apps:

App list Enabled: - accessibility: 1.0.1 - activity: 2.7.0 - admin_audit: 1.4.0 - apporder: 0.5.0 - audioplayer: 2.4.1 - calendar: 1.6.3 - cloud_federation_api: 0.0.1 - comments: 1.4.0 - contacts: 2.1.6 - dav: 1.6.0 - federatedfilesharing: 1.4.0 - federation: 1.4.0 - files: 1.9.0 - files_accesscontrol: 1.4.0 - files_antivirus: 1.3.2 - files_external: 1.5.0 - files_pdfviewer: 1.3.2 - files_retention: 1.3.0 - files_sharing: 1.6.2 - files_signing: 0.0.2 - files_texteditor: 2.6.0 - files_trashbin: 1.4.1 - files_versions: 1.7.1 - files_videoplayer: 1.3.0 - firstrunwizard: 2.3.0 - gallery: 18.1.0 - logreader: 2.0.0 - lookup_server_connector: 1.2.0 - mail: 0.11.0 - mindmaps: 0.1.0 - nextcloud_announcements: 1.3.0 - notifications: 2.2.1 - oauth2: 1.2.1 - password_policy: 1.4.0 - polls: 0.8.3 - provisioning_api: 1.4.0 - qownnotesapi: 18.8.0 - ransomware_detection: 0.4.1 - richdocuments: 3.0.1 - serverinfo: 1.4.0 - sharebymail: 1.4.0 - support: 1.0.0 - survey_client: 1.2.0 - systemtags: 1.4.0 - theming: 1.5.0 - twofactor_backupcodes: 1.3.1 - updatenotification: 1.4.1 - workflowengine: 1.4.0 Disabled: - encryption - files_reader - keeweb - spreed - user_external - user_ldap

Nextcloud configuration:

Config report

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"sssssssssssssssssssssss"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"overwrite.cli.url": "https://cloud-signed.in-der-cloud.at",
"dbtype": "mysql",
"version": "14.0.3.0",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"forcessl": true,
"forceSSLforSubdomains": true,
"theme": "",
"maintenance": false,
"loglevel": 2,
"trashbin_retention_obligation": "auto",
"htaccess.RewriteBase": "/",
"updater.release.channel": "stable",
"enable_avatars": true,
"proxy": "sssssssssssssssssss",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"memcache.local": "\OC\Memcache\APCu"
},
"apps": {
"accessibility": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": ""
},
"activity": {
"enabled": "yes",
"installed_version": "2.7.0",
"types": "filesystem"
},
"admin_audit": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "logging"
},
"apporder": {
"enabled": "yes",
"installed_version": "0.5.0",
"ocsid": "174715",
"types": ""
},
"audioplayer": {
"enabled": "yes",
"installed_version": "2.4.1",
"types": "filesystem"
},
"backgroundjob": {
"lastjob": "51"
},
"calendar": {
"enabled": "yes",
"installed_version": "1.6.3",
"types": ""
},
"cloud_federation_api": {
"enabled": "yes",
"installed_version": "0.0.1",
"types": "filesystem"
},
"comments": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "logging"
},
"contacts": {
"enabled": "yes",
"installed_version": "2.1.6",
"types": ""
},
"core": {
"OC_Channel": "beta",
"backgroundjobs_mode": "ajax",
"global_cache_gc_lastrun": "1436655026",
"installedat": "1423530418.4959",
"lastcron": "1540677773",
"lastupdateResult": "[]",
"lastupdatedat": "1540677770",
"moveavatarsdone": "yes",
"oc.integritycheck.checker": "[]",
"previewsCleanedUp": "1",
"public_files": "files_sharing/public.php",
"public_gallery": "gallery/public.php",
"public_webdav": "dav/appinfo/v1/publicwebdav.php",
"remote_caldav": "dav/appinfo/v1/caldav.php",
"remote_calendar": "dav/appinfo/v1/caldav.php",
"remote_carddav": "dav/appinfo/v1/carddav.php",
"remote_contacts": "dav/appinfo/v1/carddav.php",
"remote_dav": "dav/appinfo/v2/remote.php",
"remote_files": "dav/appinfo/v1/webdav.php",
"remote_webdav": "dav/appinfo/v1/webdav.php",
"repairlegacystoragesdone": "yes",
"scss.variables": "ccccccccccxxxxxxxxxxxxxxxxxxxxxx",
"shareapi_default_expire_date": "yes",
"shareapi_enforce_links_password": "yes",
"updater.secret.created": "1539890765",
"vendor": "nextcloud"
},
"dav": {
"OCA\DAV\Migration\ValueFixInsert_ran": "true",
"buildCalendarSearchIndex": "yes",
"enabled": "yes",
"installed_version": "1.6.0",
"types": "filesystem"
},
"direct_menu": {
"enabled": "no",
"installed_version": "0.10.0",
"types": ""
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": ""
},
"federation": {
"autoAddServers": "1",
"enabled": "yes",
"installed_version": "1.4.0",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"enabled": "yes",
"installed_version": "1.9.0",
"types": "filesystem"
},
"files_accesscontrol": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "filesystem"
},
"files_antivirus": {
"av_chunk_size": "10485760",
"av_cmd_options": "",
"av_host": "",
"av_infected_action": "only_log",
"av_mode": "socket",
"av_path": "/usr/bin/clamscan",
"av_port": "0",
"av_socket": "/var/run/clamd.scan/clamd.sock",
"enabled": "yes",
"installed_version": "1.3.2",
"types": "filesystem"
},
"files_external": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "filesystem",
"user_mounting_backends": "\OC\Files\Storage\OwnCloud"
},
"files_locking": {
"enabled": "no",
"installed_version": "",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "1.3.2",
"types": ""
},
"files_reader": {
"enabled": "no",
"installed_version": "1.2.3",
"ocsid": "167127",
"types": "filesystem"
},
"files_retention": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "filesystem"
},
"files_sharing": {
"enabled": "yes",
"installed_version": "1.6.2",
"lookupServerEnabled": "yes",
"types": "filesystem"
},
"files_signing": {
"enabled": "yes",
"installed_version": "0.0.2",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.6.0",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "1.4.1",
"types": "filesystem,dav"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.7.1",
"types": "filesystem,dav"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": ""
},
"files_videoviewer": {
"enabled": "no",
"installed_version": "0.1.3",
"ocsid": "166054",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "2.3.0",
"types": "logging"
},
"gallery": {
"enabled": "yes",
"installed_version": "18.1.0",
"types": ""
},
"galleryplus": {
"enabled": "no",
"installed_version": "0",
"ocsid": "169116",
"types": ""
},
"keeweb": {
"enabled": "no",
"installed_version": "0.4.0",
"types": ""
},
"logreader": {
"enabled": "yes",
"installed_version": "2.0.0",
"ocsid": "170871",
"types": ""
},
"lookup_server_connector": {
"enabled": "yes",
"installed_version": "1.2.0",
"types": "authentication"
},
"mail": {
"enabled": "yes",
"installed_version": "0.11.0",
"types": ""
},
"mindmaps": {
"enabled": "yes",
"installed_version": "0.1.0",
"types": ""
},
"nextcloud_announcements": {
"enabled": "yes",
"installed_version": "1.3.0",
"pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
"types": "logging"
},
"notifications": {
"enabled": "yes",
"installed_version": "2.2.1",
"types": "logging"
},
"oauth2": {
"enabled": "yes",
"installed_version": "1.2.1",
"types": "authentication"
},
"password_policy": {
"enabled": "yes",
"enforceNumericCharacters": "1",
"enforceSpecialCharacters": "0",
"enforceUpperLowerCase": "1",
"installed_version": "1.4.0",
"types": ""
},
"polls": {
"enabled": "yes",
"installed_version": "0.8.3",
"types": ""
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "prevent_group_restriction"
},
"qownnotesapi": {
"enabled": "yes",
"installed_version": "18.8.0",
"types": ""
},
"ransomware_detection": {
"debug": 0,
"enabled": "yes",
"installed_version": "0.4.1",
"types": "logging"
},
"richdocuments": {
"enabled": "yes",
"installed_version": "3.0.1",
"types": "filesystem,dav,prevent_group_restriction",
"wopi_url": "xxxxxxxxxxxxxxxx"
},
"serverinfo": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": ""
},
"sharebymail": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "filesystem"
},
"spreed": {
"enabled": "no",
"installed_version": "4.0.0",
"signaling_ticket_secret": xxxxxxxxxxxxx",
"stun_servers": "["stun.nextcloud.com:443"]",
"types": "prevent_group_restriction"
},
"support": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": ""
},
"survey_client": {
"enabled": "yes",
"installed_version": "1.2.0",
"types": ""
},
"systemtags": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "logging"
},
"templateeditor": {
"enabled": "no",
"installed_version": "0.2",
"types": ""
},
"theming": {
"backgroundMime": "backgroundColor",
"cachebuster": "10",
"color": "#FFFFFF",
"enabled": "yes",
"installed_version": "1.5.0",
"logoMime": "image/png",
"logoheaderMime": "image/png",
"name": "xxxxxxxxxxx",
"types": "logging",
"url": "https:xxxxxxxxxxxxxx"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.3.1",
"types": ""
},
"updatenotification": {
"calendar": "1.6.3",
"core": "14.0.3.0",
"enabled": "yes",
"files_antivirus": "1.4.0",
"installed_version": "1.4.1",
"mail": "0.11.0",
"richdocuments": "3.0.1",
"spreed": "1.2.0",
"types": "",
"update_check_errors": "0"
},
"updater": {
"enabled": "no",
"installed_version": "0.6",
"types": ""
},
"workflowengine": {
"enabled": "yes",
"installed_version": "1.4.0",
"types": "filesystem"
},
"168708": {
"enabled": "no"
}
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no - not yet :)
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
FF 62.0.3
Operating system:
Fedora 28

Logs

Web server error log

Web server error log no error in logs

Nextcloud log (data/nextcloud.log)

Nextcloud log no logs regarding upload

Browser log

no usable logs regarding the upload

I wrote a hook to get informed by upload a file. In the Hook i checked the Folder and the Extension of the File. If it is within a expected Folder, i call a shell-command to digital sign the File.
But - i could not find the right hook to change the File in the Background.
The Hook "create" : the Tempfile is created, but empty; The File in the Folder is not created
The Hook "post_create" : The Tempfile is still there, but also empty; The File in the Folder is there, but if i signed it, nextcloud have only the unsigned version presented. I double checked it on the filesystem - the signed version is there, but it shows only the unsigned...
(I try also the "write" and "post_write" hooks....)
In the last i try to emit a Signal to rescan the uploaded File again (like the occ-command in shell), but only for the single file (scanning of the folder is too time-critical), but i could not find the node. The documentation talks about a string of path, but the routine wants a array of a node (path & storage?).
I try to get the node from :
$mount = Filesystem::getMountManager()->find($path); $storage = $mount->getStorage();
afterwords array($path,$storage) as array for $node
If i var_export the $storage i got:
var_export does not handle circular references at /var/www/indercloud.at/apps/files_signing/lib/Events/FilesEvents.php#311

what i need

The right hook to have the written Temp-File in Place (right after the upload and before the move to the Folder) or the right emit for rescanning the single file.

Application.php

public function registerHooks() { Util::connectHook('OC_Filesystem', 'create', FilesHooks::class, 'onNewFile'); // Util::connectHook('OC_Filesystem', 'post_create', FilesHooks::class, 'onNewFile'); // Util::connectHook('OC_Filesystem', 'post_update', FilesHooks::class, 'onFileUpdate'); // Util::connectHook('OC_Filesystem', 'post_rename', FilesHooks::class, 'onFileRename'); // Util::connectHook('OC_Filesystem', 'delete', FilesHooks::class, 'onFileTrash'); Util::connectHook( '\OCA\Files_Trashbin\Trashbin', 'post_restore', FilesHooks::class, 'onFileRestore' ); // Util::connectHook('\OCP\Trashbin', 'preDelete', FilesHooks::class, 'onFileDelete'); // Util::connectHook('OCP\Share', 'post_shared', FilesHooks::class, 'onFileShare'); // Util::connectHook('OCP\Share', 'post_unshare', FilesHooks::class, 'onFileUnshare'); }

Filehooks.php

`
namespace OCA\Files_Signing\Hooks;

use OCA\Files_Signing\AppInfo\Application;
use OCA\Files_Signing\Events\FilesEvents;
use OCP\AppFramework\QueryException;
use OCP\Files\InvalidPathException;
use OCP\Files\NotFoundException;

use OC\Files\Filesystem;
use OC\Files\View;
// use OCA\Activity\BackgroundJob\RemoteActivity;
// use OCA\Activity\Extension\Files;
// use OCA\Activity\Extension\Files_Sharing;
// use OCP\Activity\IManager;
use OCP\Files\IRootFolder;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Node;
use OCP\IDBConnection;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\Share;
use OCP\Share\IShare;
use OCP\Share\IShareHelper;

/**

  • init Files_Signing' Events
    */
    class FilesHooks {

    protected $rootFolder;
    protected $request;
    protected $user;
    protected $logService;

    public function __construct(IRootFolder $rootFolder, IRequest $request, IUser $user, LogService $logService) {
    $this->rootFolder = $rootFolder;
    $this->request = $request;
    $this->user = $user;
    $this->logService = $logService;

     $this->logService->log('Listener instantiated '.var_export($user,true));
    

    }

    protected static function getController() {
    $app = new Application();

     return $app->getContainer()
     		   ->query(FilesEvents::class);
    

    }

    public static function onNewFile($params) {

     if (is_array($params)) {
     	if (isset($params['path'])) {
    

// $signer = new
// $this->SignFile($params['path']);
}
}

	$view = Filesystem::getView();
	$localFile = $view->getLocalFile($params['path']);
	
	$myfile = fopen("pdfsign.log", "a");
	fwrite($myfile, "\n-------------------------------\n: ");
	fwrite($myfile, "Dateianfrage zum signieren - 1 : ".var_export($localFile,true). PHP_EOL);
	fwrite($myfile, "Dateianfrage zum signieren - 2 : ".var_export($params,true). PHP_EOL);
	fclose($myfile);
	
	self::getController()->onNewFile($params);

} 

`

Fileevents.php

`namespace OCA\Files_Signing\Events;
use OCA\Files_Signing\Model\FilesDocument;
use OCA\Files_Signing\Service\FilesService;
use OCA\Files_Signing\Service\MiscService;
// use OCA\Signing\Api\v1\Signing;
// use OCA\Signing\Model\Index;
use OCP\AppFramework\QueryException;
use OCP\Files\InvalidPathException;
use OCP\Files\NotFoundException;
use OCP\Files\IRootFolder;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Node;
use OCP\IDBConnection;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\Share;
use OCP\Share\IShare;
use OCP\Share\IShareHelper;
use OC\Files\Filesystem;
use OC\Files\View;
use OCP\IServerContainer;
use OCP\IConfig;
use OCP\ITempManager;
use OC\Files\Utils\Scanner;
// use OC\Files\Cache\Storage;
// use OC\Hooks\Emitter;

class FilesEvents {

/** @var string */
private $userId;

/** @var FilesService */
private $filesService;

/** @var MiscService */
private $miscService;

/** @var IRootFolder */
private $rootFolder;

private $shareHelper;
private $config;

// private $emitter;
private $storage;
private $node;

public function __construct($userId, FilesService $filesService, MiscService $miscService, IRootFolder $rootFolder, IShareHelper $sharehelper,
			IConfig $config) {
			/*, Storage $storage*/ 
	$this->userId = $userId;
	$this->filesService = $filesService;
	$this->miscService = $miscService;
	$this->rootFolder = $rootFolder;
	$this->shareHelper = $sharehelper;
	$this->config = $config;

// $this->node = $node;
// $this->storage = $storage;
// $this->emitter = $emit;
}

public function onNewFile(array $params) {
	// ToDo - check if $params is as expteced...
	$this->SignFile($params['path']);
}

public function SignFile($path) {
// Prüfe ob es sich um eine PDF-Datei handelt
if(strlen($path) >= 5 && ( substr($path, -strlen('.pdf')) === '.pdf')) {
$directory = dirname($path);
$directoryPattern = "2_";

		$output_dir = $directory."\n";

		$dir_temp = explode('/',$directory);
		
		$lastDirectory = end($dir_temp);


		if(strlen($lastDirectory) >= strlen($directoryPattern)  && (substr($lastDirectory, 0, strlen($directoryPattern) ) === $directoryPattern)) {

// list($filePath, $uidOwner, $fileId) = $this->getSourcePathAndOwner($path);
// if ($fileId === 0) {
// // Could not find the file for the owner ...
// return;
// }

			$fileInfos = \OC\Files\Filesystem::getFileInfo($path);

			$accessList = $this->getUserPathsFromPath($path, $this->userId);

// $accessList = $this->getUserPathsFromPath($path, $uidOwner);
$view = Filesystem::getView();
$localFile = $view->getLocalFile($path);
// $storage = $view->resolvePath($path);
// list($storage,) = $view->resolvePath($path);
// $localFile = \OC\Files\Filesystem::getLocalFile($path);
// $InternalPath = $view->getInternalPath();

// $view = \OC\Files\Filesystem::getView();

			$user = \OCP\User::getUser();
			$localPath = \OC_User::getHome($user);
			$fullPath = $localPath ."/". $fileInfos['path'];
			
			$extension = pathinfo($path, PATHINFO_EXTENSION);
			$tmpFile = \OC::$server->getTempManager()->getTemporaryFile($extension);

// $path_1 = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
$mount = Filesystem::getMountManager()->find($path);
$storage = $mount->getStorage();

// // $localfile = $view->getLocalFile($fileInfos['path']);

			$output_dir .= "User = ".var_export($user,true)."\n";
			$output_dir .= "LocalPath = ".var_export($localPath,true)."\n";
			$output_dir .= "Path = ".var_export($path,true)."\n";
			$output_dir .= "FullPath = ".var_export($fullPath,true)."\n";
			$output_dir .= "localFile = ".var_export($localFile,true)."\n";

// $output_dir .= "fileInfos = ".var_export($fileInfos,true)."\n";
// $output_dir .= "view = ".var_export($view,true)."\n";
$output_dir .= "_files = ".var_export($_FILES,true)."\n";
// $output_dir .= "InternalPath = ".var_export($InternalPath,true);
$output_dir .= "tmpFile = ".var_export($tmpFile,true)."\n";
// $output_dir .= "Storage = ".var_export($storage,true)."\n";

			$output = "\n";

			if (file_exists($localFile)) {
				$output .= "Originaldatei vorhanden ...\nDateigröße = ".filesize($localFile)."\n";
			} else {
				$output .= "Originaldatei NICHT vorhanden ...\n";
			}
			
			if (file_exists($tmpFile)) {
				$output .= "TEMP-datei vorhanden ...\nDateigröße = ".filesize($tmpFile)."\n";
			} else {
				$output .= "TEMP-datei NICHT vorhanden ...\n";
			}
			
			$fullPath = $localFile;

// $fullPath = $tmpFile;

			$arr_output = array();
			
			$cmd= "/usr/bin/java -cp /usr/local/PortableSigner -jar /usr/local/PortableSigner/PortableSigner.jar -n -t ".$fullPath." -o ".$fullPath.".signed -s /var/www/nwb-cert.pfx -p nwb-export -z -b de -i /var/www/nwb-logo.png 2>&1";

			$output1 =  exec($cmd,$arr_output);
			$output .= var_export($output1,true)."\n";
			
			if (file_exists($fullPath.".signed")) {
				// Test to inject the file to the (maybe) existing filehandle....

// $newPDF = file_get_contents($fullPath.".signed");
// $oldPDF = file_put_contents($fullPath,$newPDF);

				$rueck = rename($fullPath,$fullPath."_old");
				if ($rueck == false) {
					$output .= "Umbenennen Original fehlgeschlagen\n";
				}

				$rueck = rename($fullPath.".signed",$fullPath);
				if ($rueck == false) {
					$output .= "Umbenennen Signiertes File fehlgeschlagen\n";
				} else {
					$rueck = unlink($fullPath."_old");
					if ($rueck == false) {
						$output .= "Löschen der Datei fehlgeschlagen\n";
					}
				}
			} else {
				$output .= "Datei nicht vorhanden\n";
			}

// $this->emitter->emit('\OC\Files\Cache\Scanner','scanFile',$path);
$emitter = new \OC\Hooks\PublicEmitter;
// $emitter->emit('\OC\Files\Cache\Scanner','scanFile',$this->node);
// $emitter->emit('\OC\Files\Cache\Scanner','scanFile',["path" => $path,"storage" => $storage]);
// \OC_Hook::emit('Scanner','scan',$fullPath);
}
}
}`

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #1371 (No file-uploading possible at all), #3695 (Upload not blocked - File access control), #10184 (Uploading medium size files fails), #6423 (Some apps do not respect language settings for British English), and #8629 (Birthday Calendar: Update on contact save fails if more than one date field is used).

@tom-lp-at
Copy link
Author

for now i use a cmd-exec to rescan the Folder.
In my opinion nextcloud misses one hook (as i explained above) in the core to cover a file manipulation after the upload and before building the cache and metadata for the uploaded file...
kr Tom

@tom-lp-at
Copy link
Author

I transferred the beta-version of the App to a other server to test it with activated server-side-encryption.
If the encryption is enabled i got a /tmp/oc_tmp_xxxxxx-.pdf as file that is uploaded (and not the real filename). If i sign this file it would not be transferd to the expected folder. The unsigned Version of the File is placed into the Folder.

I double checked it on the server without encryption and there i got the filename that it would be named in the folder....
I try different ways to sign and transfer the signed file to the folder, but i got only the original uploaded file.
encrypted Server : /tmp/oc_tmp_93wITX-.pdf
Server without encryption : /2_Testfiles/DSGVO-20180611223907.pdf
kr Tom

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@skjnldsv
Copy link
Member

As there is no feedback since a while I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: filesystem
Projects
None yet
Development

No branches or pull requests

4 participants