We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If executePreFileUpload execution time is more than one second, the FileUploadNotAllowedException is ignored and file is uploaded into the chat.
File upload is blocked
File upload successful
import { IAppAccessors, ILogger, IConfigurationExtend, IEnvironmentRead, IHttp, IModify, IPersistence, IRead, } from '@rocket.chat/apps-engine/definition/accessors'; import { App } from '@rocket.chat/apps-engine/definition/App'; import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata'; import { FileUploadNotAllowedException } from '@rocket.chat/apps-engine/definition/exceptions'; import { IFileUploadContext, IPreFileUpload } from '@rocket.chat/apps-engine/definition/uploads'; export class PreMethodTimeoutTestApp extends App implements IPreFileUpload { constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) { super(info, logger, accessors); } async sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } public async executePreFileUpload(context: IFileUploadContext, read: IRead, http: IHttp, persis: IPersistence, modify: IModify): Promise<void> { await this.sleep(1003); throw new FileUploadNotAllowedException('Virus found'); } }
Skipped file:
But the exception was throwed:
This issue does not reproduce in version 6.9.x or older
The text was updated successfully, but these errors were encountered:
For reference opened here:
https://forums.rocket.chat/t/how-to-use-apps-for-long-1-20-sec-file-checking-on-external-service/20731
Please follow the guide.
https://developer.rocket.chat/docs/contribute-through-bug-reporting
Sorry, something went wrong.
I tested this in RocketChat 6.13, and this issue is also present.
License Type: Enterprise
You should open a ticket directly with support - you will get a faster response there. Let them know this issue is open.
No branches or pull requests
Description:
If executePreFileUpload execution time is more than one second, the FileUploadNotAllowedException is ignored and file is uploaded into the chat.
Steps to reproduce:
Expected behavior:
File upload is blocked
Actual behavior:
File upload successful
Server Setup Information:
Client Setup Information
Additional context
Relevant logs:
Skipped file:
But the exception was throwed:
This issue does not reproduce in version 6.9.x or older
The text was updated successfully, but these errors were encountered: