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

Merge branch release/v8.1.0 into master #478

Merged
merged 103 commits into from
Jun 19, 2024
Merged

Merge branch release/v8.1.0 into master #478

merged 103 commits into from
Jun 19, 2024

Conversation

papacarlo
Copy link
Contributor

  • [feature] Use built-in nodejs fs functions instead of fs-extra and mkdirp
  • [integration tests] baseConnector integration tests
  • [integration tests] Refactoring: baseConnector, mySqlBaseConnector. Tests fixes and improvement, bugs fixes.
  • [integration tests] Tests fixes and improvement pt.2
  • [mysql] Unify upsert result
  • [integration tests] Refactoring upsert(): opt_updateUserIndex deleted, affectedRows -> isInsert
  • [git actions] Postgres and mysql actions
  • [git actions] Oracle and mssql actions, unit test action
  • [git actions] Dameng tests action, dameng connector refactoring, dependencies update, minor structure refactorng
  • [git actions] Dameng connector tracking
  • [git actions] PR fixes and upgrade schema added
  • [git actions] PR fixes, schema reversion
  • [npm] Revert npm-lock
  • [refactoring] Remove unused 'sfct' command
  • [feature] Use WOPISrc param to make local urls
  • [bug] Lowercase fileType param; Fix bug 65653
  • [feature] WOPI created zero-weight file replacement with template
  • [feature] WOPI locale fixes
  • [feature] WOPI discovery editnew template extensions filter
  • [feature] Omit X-WOPI-Lock during document creation.
  • [config] Set pg connector timeouts to limited values; Bump pg version
  • [config] Set dameng, oracle and mssql databases connectors timeouts to limited values
  • [utils] deepMergeObjecs(), isObject() functions added
  • Enable static code analysis with codeql (Add static code analysis with codeql #447)
  • Disable codeql scanning on pull_request event (Disable codeql scanning on pull_request event #455)
  • [refactoring] Remove unused parameter and deprecated params
  • [config] Add externalRequest options to separate requests; for bug 63590
  • [config] Revert develop params
  • [feature] WOPI Save As implementation
  • [feature] Fix wopi save as
  • [wopi] Fix downloadfile handler for wopi; fix bug 66612
  • [wopi] Add "default" action flag for non-editable formats;Fix bug 66714
  • [wopi] Add "formsubmit" discovery action; For bug 66720
  • [bug] Fix downloadFile for wopi; For bug https://bugzilla.onlyoffice.com/show_bug.cgi?id=66818
  • [bug] Init context cache on 'connection' event; Fix bug 66841
  • [bug] Fix exception with undefined permissions in config
  • [tenant] Add services.CoAuthoring.server.editorStatStorage config param for multitenant server;For bug 66591
  • [bug] Fix bug with opening error after forcesave on forgotten file
  • [fix] Git actions now ignoring tags
  • [config] Add persistentStorage as alternative storage for forgotten files
  • [feature] Add error CONVERT_LIMITS(-10) for conversion service
  • [bug] Save standard pdf on form submission instead of extended pdf
  • Bump express from 4.18.2 to 4.19.2 in /DocService
  • Bump express from 4.16.4 to 4.19.2 in /SpellChecker
  • [bug] Refactor wopi discovery for new pdf editor; Fix downloadFile for editnew action; For bug 67135
  • [bug] Set interface lang as lcid for file assembling from changes; for bug 66926
  • [feature] Add "pdf" param as pdf save options
  • [bug] Refactor ErrToReload cleaning; Fix bug 67297
  • [bug] Set isPrint flag while form submission
  • [bug] Fix RequestDefaults absence in postRequestPromise; Fix bug 67402
  • [feature] Allow "WOPISrc" and "shardkey" query params as shard key
  • [feature] Remove unused allowPrivateIPAddressForSignedRequests; bug 63590
  • [config] Rename proxyAuth->proxyUser
  • [bug] Set "formsubmit" as default action; Fix bug 66720
  • [bug] Fix "WOPISrc" convert param in getConverterHtml
  • [bug] Fix error on reconnection in formsubmit action; For bug 66720
  • [bug] Add clearTimeout in downloadUrlPromiseWithoutRedirect; Fix bug 67804
  • [bug] Fix sendForm request for wopi; for bug 66720
  • [refactoring] Refactor publish as async function
  • Bump ejs from 3.1.8 to 3.1.10 in /DocService
  • Bump mysql2 from 2.3.3 to 3.9.7 in /DocService
  • [bug] Serve static content for "storage-fs" only; Fix bug 67908
  • [bug] For bug 67908
  • [bug] Refactor Locks storage; for bug 65773
  • [bug] For bug 65773
  • [bug] Do not serve content with empty special dir; For bug 67908
  • [bug] Fix bug 67983
  • [bug] Change privateKey format; Make generateProofSign async; For bug 66601
  • [bug] Allow to restrict 'mode' rights; For bug 68198
  • [bug] Check permissions in commandSetPassword; Fix bug 68258
  • [bug] Fix bug with queue closing before document saving in checkDocumentExpire
  • [bug] Change wopi exponent format; For bug 66601
  • [bug] Use shutdownFlag for WOPI editing
  • [fix] Added support of MySql ssl connection
  • Bump mysql2 from 2.3.3 to 3.9.8 in /DocService
  • [fix] Make closePool async; Bump nodejs version for mysql test; For bug 68194
  • [bug] Change privateKey config param; For bug 66601
  • [bug] Fix bug with wopi checkFileInfo on one shard and websocket on other shard
  • [bug] Fix bug with LastModifiedTime changing after putFile(nextcloud)
  • [feature] Add docs_api_config input param for wopi; For bug 58764
  • [bug] Check result of wopi unlock; Fix bug 68424
  • [bug] Add stubs for shardkey params until integrators pass these parameters to all requests
  • [bug] Use deterministic(not random) lockId to fix issues with forgotten openings due to integrator failures; For bug 68424
  • [bug] Add storage test with tenant; Fix bug 68563
  • [bug] Fix bug with opening after editing with the condition wopi SupportsLocks=false; Fix bug 68501
  • [bug] Move copyOrigin logic from x2t; Fix bug 68600
  • [bug] Use outputFormat in id instead of outputType; Fix bug 68653
  • [bug] Fix crash; For bug 68645
  • [bug] Add maxRetries option to fix unexpected ENOTEMPTY during rm

konovalovsergey and others added 30 commits November 15, 2023 16:56
Integration tests for databases and GitHub actions
# Conflicts:
#	DocService/sources/databaseConnectors/baseConnector.js
…elop

# Conflicts:
#	Common/sources/storage-fs.js
#	DocService/package.json
#	DocService/sources/DocsCoServer.js
#	DocService/sources/databaseConnectors/connectorUtilities.js
#	DocService/sources/databaseConnectors/postgreConnector.js
#	DocService/sources/gc.js
#	DocService/sources/mySqlBaseConnector.js
#	DocService/sources/wopiClient.js
konovalovsergey and others added 26 commits May 15, 2024 18:08
…en openings due to integrator failures; For bug 68424
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

var result = null;
var error = null;
try {
result = yield pool.query(sqlCommand, opt_values);

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
expires = Math.ceil(expires / 1000);
expires += expiredAfter;

var md5 = crypto.createHash('md5').update(expires + decodeURIComponent(uri) + storageSecretString).digest("base64");

Check failure

Code scanning / CodeQL

Use of a broken or weak cryptographic algorithm High

A broken or weak cryptographic algorithm
depends on
sensitive data from an access to secretString
.
A broken or weak cryptographic algorithm
depends on
sensitive data from an access to storageSecretString
.
Comment on lines +61 to +84
router.use(`/${bucketName}/${storageFolderName}/${rout}`, (req, res, next) => {
const index = req.url.lastIndexOf('/');
if ('GET' === req.method && index > 0) {
let sendFileOptions = {
root: rootPath, dotfiles: 'deny', headers: {
'Content-Disposition': 'attachment'
}
};
const urlParsed = urlModule.parse(req.url);
if (urlParsed && urlParsed.pathname) {
const filename = decodeURIComponent(path.basename(urlParsed.pathname));
sendFileOptions.headers['Content-Type'] = mime.getType(filename);
}
const realUrl = decodeURI(req.url.substring(0, index));
res.sendFile(realUrl, sendFileOptions, (err) => {
if (err) {
operationContext.global.logger.error(err);
res.status(400).end();
}
});
} else {
res.sendStatus(404);
}
});

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a file system access
, but is not rate-limited.
//https://github.com/ONLYOFFICE/web-apps/blob/4a7879b4f88f315fe94d9f7d97c0ed8aa9f82221/apps/documenteditor/main/app/controller/Main.js#L1652
//this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false);
let isPasswordSupport = tenOpenProtectedFile && !conn.user?.view && false !== conn.permissions?.protect;
ctx.logger.debug('commandSetPassword isEnterCorrectPassword=%s, hasDocumentPassword=%s, hasPasswordCol=%s, isPasswordSupport=%s', conn.isEnterCorrectPassword, hasDocumentPassword, hasPasswordCol, isPasswordSupport);

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
an access to isEnterCorrectPassword
as clear text.
This logs sensitive data returned by
an access to isEnterCorrectPassword
as clear text.
//https://github.com/ONLYOFFICE/web-apps/blob/4a7879b4f88f315fe94d9f7d97c0ed8aa9f82221/apps/documenteditor/main/app/controller/Main.js#L1652
//this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false);
let isPasswordSupport = tenOpenProtectedFile && !conn.user?.view && false !== conn.permissions?.protect;
ctx.logger.debug('commandSetPassword isEnterCorrectPassword=%s, hasDocumentPassword=%s, hasPasswordCol=%s, isPasswordSupport=%s', conn.isEnterCorrectPassword, hasDocumentPassword, hasPasswordCol, isPasswordSupport);

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
an access to isPasswordSupport
as clear text.
try {
connection = await pool.getConnection();

const result = await connection.query(sqlCommand, values);

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
This query string depends on a
user-provided value
.
@papacarlo papacarlo merged commit 9ecd899 into master Jun 19, 2024
3 checks passed
@papacarlo papacarlo deleted the release/v8.1.0 branch June 26, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants