Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 384a24b
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 19:11:41 2020 +0530

    Remove unwanted changes

commit fa877fb
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 19:02:43 2020 +0530

    Remove unwanted changes

commit b81cf79
Merge: 027d65a 39047c1
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 18:44:45 2020 +0530

    Merge https://github.com/ballerina-platform/ballerina-lang into failover

commit 027d65a
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 18:43:40 2020 +0530

    Update with master

commit 886efe0
Merge: 542ddbd 2bb5ae1
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 18:20:31 2020 +0530

    Merge branch 'retry' of https://github.com/kalaiyarasiganeshalingam/ballerina-lang into failover

commit 39047c1
Merge: f4b0e32 3d77926
Author: kalaiyarasiganeshalingam <[email protected]>
Date:   Mon Feb 3 15:27:54 2020 +0530

    Merge pull request #19998 from kalaiyarasiganeshalingam/example

    Add an example for webSocket retry

commit 3d77926
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 14:18:38 2020 +0530

    Make the suggested change

commit f4b0e32
Merge: cfde288 de7e116
Author: Danesh Kuruppu <[email protected]>
Date:   Mon Feb 3 13:45:32 2020 +0530

    Merge pull request #19723 from kalaiyarasiganeshalingam/retry

    Implement retry for webSocket endpoint

commit cfde288
Merge: a1b6af8 94b4fb7
Author: praneesha <[email protected]>
Date:   Mon Feb 3 12:07:51 2020 +0530

    Merge pull request #20830 from praneesha/lang-issue-20829

    Add the Latest Content from the Staging Website Repo

commit a1b6af8
Merge: 487f603 d356099
Author: Chamil Elladeniya <[email protected]>
Date:   Mon Feb 3 11:50:25 2020 +0530

    Merge pull request #20753 from Tharuja/apis-with-persistent-cookies

    Implement  APIs  for  HTTP  persistent cookies

commit 94b4fb7
Author: praneesha <[email protected]>
Date:   Mon Feb 3 11:17:02 2020 +0530

    Add the latest content

commit 487f603
Merge: 898ae60 463c0de
Author: Nadeeshaan Gunasinghe <[email protected]>
Date:   Mon Feb 3 09:27:05 2020 +0530

    Merge pull request #20819 from nadeeshaan/completion-engine-revamp

    Add Sorting support For top Level Contexts

commit 898ae60
Merge: ba69b5e af06634
Author: Rasika Perera <[email protected]>
Date:   Mon Feb 3 09:16:07 2020 +0530

    Merge pull request #20817 from rasika/fix-19627

    Fix `Create local variable` code action breaks code

commit ab49209
Author: Kalaiyarasi <[email protected]>
Date:   Mon Feb 3 08:51:15 2020 +0530

    Fix suggested changes

commit 463c0de
Author: nadeeshaan <[email protected]>
Date:   Sun Feb 2 11:42:53 2020 +0530

    fix checkstyle issues

commit ba69b5e
Merge: d236b5d 207f4e2
Author: manuranga perera <[email protected]>
Date:   Sat Feb 1 14:54:49 2020 +0530

    Merge pull request #20768 from manuranga/string-value-langlib

    Migrate record value put to use BString keys

commit 30817aa
Merge: 2776ad0 d236b5d
Author: nadeeshaan <[email protected]>
Date:   Sat Feb 1 13:52:09 2020 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into completion-engine-revamp

commit 2776ad0
Author: nadeeshaan <[email protected]>
Date:   Sat Feb 1 13:19:18 2020 +0530

    fix failing service scope test cases

commit 1a4b498
Author: nadeeshaan <[email protected]>
Date:   Sat Feb 1 13:10:13 2020 +0530

    Add sorting within service scope

commit af06634
Author: Rasika <[email protected]>
Date:   Sat Feb 1 00:00:21 2020 +0530

    Fix `Create local variable` code action breaks code

    Signed-off-by: Rasika <[email protected]>

commit d236b5d
Merge: ba5cefb 4892f5f
Author: Kishanthan Thangarajah <[email protected]>
Date:   Fri Jan 31 17:38:44 2020 +0530

    Merge pull request #20793 from NipunaRanasinghe/improve-jar-creation

    Improve final executable jar creation

commit 8aa9474
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Wed Nov 20 16:12:04 2019 +0530

    Adding an example for webSocket retry #19749

    Make changes in the description

    Add new line

commit ba5cefb
Merge: 47791e1 d8c7efd
Author: Nadeeshaan Gunasinghe <[email protected]>
Date:   Fri Jan 31 15:15:49 2020 +0530

    Merge pull request #20748 from nadeeshaan/completion-engine-revamp

    Revamp Language Server Completions Engine

commit de7e116
Author: Kalaiyarasi <[email protected]>
Date:   Fri Jan 31 14:39:48 2020 +0530

    Make the change in the method comment

commit 2bb5ae1
Author: Kalaiyarasi <[email protected]>
Date:   Fri Jan 31 12:07:19 2020 +0530

    Implement retry for WebSocket client

    Resolve #19717

commit d8c7efd
Merge: 1a402a3 47791e1
Author: nadeeshaan <[email protected]>
Date:   Fri Jan 31 11:47:35 2020 +0530

    sync with master

commit 1a402a3
Author: nadeeshaan <[email protected]>
Date:   Fri Jan 31 10:57:57 2020 +0530

    revamp top level sorting order

commit 6dd26e5
Merge: b4aa67a 8d41dd9
Author: nadeeshaan <[email protected]>
Date:   Fri Jan 31 06:52:51 2020 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into completion-engine-revamp

commit d356099
Author: Tharuja <[email protected]>
Date:   Thu Jan 30 21:45:35 2020 +0530

    Change cookie store and tests

commit 4892f5f
Author: Nipuna Ranasinghe <[email protected]>
Date:   Thu Jan 30 14:18:39 2020 +0530

    Add buffered input stream

commit 207f4e2
Merge: 9e7606e 99ebc8a
Author: manuranga perera <[email protected]>
Date:   Thu Jan 30 12:49:03 2020 +0530

    Merge branch 'master' of github.com:ballerina-platform/ballerina-lang into string-value-langlib

commit e910724
Author: Tharuja <[email protected]>
Date:   Thu Jan 30 11:50:58 2020 +0530

    Change completionWithinTransaction file

commit ddda14f
Merge: dde5c16 e616c28
Author: Tharuja <[email protected]>
Date:   Thu Jan 30 11:02:31 2020 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into apis-with-persistent-cookies

commit dde5c16
Author: Tharuja <[email protected]>
Date:   Thu Jan 30 10:25:32 2020 +0530

    Change language server unit tests

commit 2dc1c20
Author: Tharuja <[email protected]>
Date:   Wed Jan 29 23:31:49 2020 +0530

    Add InvalidCookieError

commit 9e7606e
Author: manuranga perera <[email protected]>
Date:   Tue Jan 28 17:46:33 2020 +0530

    Migrate record value put to use BString keys

commit 5904687
Author: Tharuja <[email protected]>
Date:   Wed Jan 29 14:08:09 2020 +0530

    Change cookie store and csv persistent cookie handler

commit 644da0f
Author: Tharuja <[email protected]>
Date:   Wed Jan 29 11:01:39 2020 +0530

    Resolve language and formatting issues

commit c1614ae
Author: Nipuna Ranasinghe <[email protected]>
Date:   Tue Jan 28 11:29:19 2020 +0100

    improve final executable jar creation task

commit f07ec98
Author: Tharuja <[email protected]>
Date:   Mon Jan 27 21:36:39 2020 +0530

    Change variable names in cookie file

commit 3bf9fc2
Author: Tharuja <[email protected]>
Date:   Mon Jan 27 17:34:36 2020 +0530

    Change language server unit tests

commit b4aa67a
Merge: 80c4306 b577044
Author: nadeeshaan <[email protected]>
Date:   Mon Jan 27 13:12:03 2020 +0530

    Sync with master

commit c4dc661
Author: Tharuja <[email protected]>
Date:   Mon Jan 27 12:02:20 2020 +0530

    Change tests

commit b114da7
Author: Tharuja <[email protected]>
Date:   Mon Jan 27 12:00:32 2020 +0530

    Fix issue in csv persistent cookie handler

commit 80c4306
Merge: 0040abe bf906ee
Author: nadeeshaan <[email protected]>
Date:   Mon Jan 27 09:22:41 2020 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into completion-engine-revamp

commit 0040abe
Author: nadeeshaan <[email protected]>
Date:   Mon Jan 27 09:21:38 2020 +0530

    fix the checkstyle issues

commit 6d06d83
Author: nadeeshaan <[email protected]>
Date:   Sun Jan 26 18:00:48 2020 +0530

    migrate to completion item wrapper usage

commit 3020a7e
Merge: aa6bd5b bf906ee
Author: Tharuja <[email protected]>
Date:   Sun Jan 26 16:29:25 2020 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into apis-with-persistent-cookies

commit aa6bd5b
Author: Tharuja <[email protected]>
Date:   Sun Jan 26 16:28:25 2020 +0530

    Change language server unit tests

commit bed1e01
Author: Tharuja <[email protected]>
Date:   Sun Jan 26 16:20:48 2020 +0530

    Change unit tests and integration tests

commit 1b0ba4d
Author: Tharuja <[email protected]>
Date:   Sat Jan 25 21:15:31 2020 +0530

    Change csv persistent cookie handler

commit 6167c6d
Author: Tharuja <[email protected]>
Date:   Fri Jan 24 17:38:02 2020 +0530

    Change csv persistent cookie handler

commit b0829c4
Author: nadeeshaan <[email protected]>
Date:   Fri Jan 24 13:35:41 2020 +0530

    revamp sorting model

commit b3e3918
Author: Tharuja <[email protected]>
Date:   Fri Jan 24 11:20:22 2020 +0530

    Add log-warning when using persistent cookies

commit 70a8d83
Author: Tharuja <[email protected]>
Date:   Thu Jan 23 13:45:47 2020 +0530

    Add CookieHandlingError

commit 92129a0
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:33:55 2020 +0530

    Change variable names in addCookies function

commit 4c83b4c
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:33:01 2020 +0530

    Add unit tests

commit cca53b9
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:32:11 2020 +0530

    Add Integration Tests

commit 90bd156
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:30:31 2020 +0530

    Change cookie configuration

commit 377a86a
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:29:23 2020 +0530

    Change cookie store functions

commit f4c02b1
Author: Tharuja <[email protected]>
Date:   Wed Jan 22 16:27:05 2020 +0530

    Change variable names in cookie

commit ee2c275
Author: Tharuja <[email protected]>
Date:   Thu Jan 16 15:13:23 2020 +0530

    Add validateFileExtension function

commit bd531e2
Author: Tharuja <[email protected]>
Date:   Thu Jan 16 09:39:15 2020 +0530

    Change cookie configuration

commit 538f2d8
Author: Tharuja <[email protected]>
Date:   Mon Jan 13 14:26:42 2020 +0530

    Add limits on the number of cookies in cookie-store

commit 186e1ad
Author: Tharuja <[email protected]>
Date:   Mon Jan 13 14:08:53 2020 +0530

    Add more functions into Cookie-Store

commit 7bfacf0
Author: Tharuja <[email protected]>
Date:   Mon Jan 13 13:56:06 2020 +0530

    Add persistent cookies

commit 542ddbd
Merge: 68590a0 b1ba4e0
Author: kalaiyarasiganeshalingam <[email protected]>
Date:   Mon Nov 18 21:23:25 2019 +0530

    Merge pull request #2 from nadeeshaan/failover

    Fix language server tests

commit b1ba4e0
Author: nadeeshaan <[email protected]>
Date:   Mon Nov 18 18:40:32 2019 +0530

    Fix language server tests

commit 68590a0
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Mon Nov 18 15:51:57 2019 +0530

    Remove unused import

commit 2a449bd
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Mon Nov 18 14:58:17 2019 +0530

    Add testcase

commit ab7d1b5
Merge: 5fc5852 a79c4b5
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Fri Nov 15 09:01:59 2019 +0530

    Merge https://github.com/ballerina-platform/ballerina-lang into failover

commit 5fc5852
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Thu Nov 14 15:06:33 2019 +0530

    Fix the functionality breaking

commit ae92021
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Thu Nov 14 11:14:50 2019 +0530

    Resolve conflict

commit 9b06044
Merge: 0d6c5a3 c6fecf5
Author: kalaiyarasiganeshalingam <[email protected]>
Date:   Thu Nov 14 10:21:30 2019 +0530

    Merge branch 'master' into failover

commit 0d6c5a3
Merge: 3062077 f2c51c8
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Wed Nov 13 11:35:30 2019 +0530

    Merge https://github.com/ballerina-platform/ballerina-lang into failover

commit 3062077
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Wed Nov 13 11:32:58 2019 +0530

    Improve the implementation

commit 166a8f3
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Tue Nov 12 15:42:10 2019 +0530

    CountDown the countDownLatch

commit 0815423
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Tue Nov 12 13:04:39 2019 +0530

    Fix build fail

commit c4a9d96
Merge: 563fc05 22256f3
Author: kalaiyarasiganeshalingam <[email protected]>
Date:   Mon Nov 11 17:59:19 2019 +0530

    Merge branch 'master' into failover

commit 563fc05
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Mon Nov 11 17:30:27 2019 +0530

    Improve the implementation

commit c1a04dc
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Sun Nov 10 19:47:07 2019 +0530

    Implement failover client

commit 54fe3cc
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Fri Nov 8 13:29:58 2019 +0530

    Change the description

commit 8e73465
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Fri Nov 8 13:25:29 2019 +0530

    Add counDownLatch for every connection

commit 2f0eaee
Merge: eac7d98 0f1b50c
Author: kalaiyarasiganeshalingam <[email protected]>
Date:   Thu Nov 7 10:44:23 2019 +0530

    Merge pull request #1 from nadeeshaan/kUpRetry

    Fix failing language server tests

commit 0f1b50c
Author: nadeeshaan <[email protected]>
Date:   Wed Nov 6 08:12:15 2019 +0530

    Fix failing tests

commit 87fd284
Merge: eac7d98 b167099
Author: nadeeshaan <[email protected]>
Date:   Wed Nov 6 07:58:26 2019 +0530

    Merge branch 'master' of https://github.com/ballerina-platform/ballerina-lang into kUpRetry

commit eac7d98
Author: Kalaiyarasi <askalalai31@gmailcom>
Date:   Sat Nov 2 17:12:35 2019 +0530

    Implement retry for webSocket endpoint
  • Loading branch information
kalaiyarasiganeshalingam committed Feb 3, 2020
1 parent 47791e1 commit bdde242
Show file tree
Hide file tree
Showing 190 changed files with 9,404 additions and 4,593 deletions.
27 changes: 18 additions & 9 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
layout: ballerina-inner-page
title: Reporting a Security Vulnerability
permalink: /security/
---

# Security Policy

Ballerina project maintainers take security issues very seriously and all the vulnerability reports are treated with the highest priority and confidentiality.
Expand All @@ -7,29 +13,32 @@ Ballerina project maintainers take security issues very seriously and all the vu

## Reporting a vulnerability

Ensure you are using the latest Ballerina version before you test a security issue, run an automated security scan or perform a penetration test.
Ensure you are using the latest Ballerina version before you run an automated security scan or perform a penetration test against it.

If you have any concerns regarding the security aspects of the source code or any other resource in this repo or have uncovered a security vulnerability, we strongly encourage you to report that to our private and highly confidential security mailing list: **[[email protected]](mailto:[email protected])** first using the below key without disclosing them in any forums, sites, or other groups - public or private.
Based on the ethics of responsible disclosure, you must only use the **[[email protected]](mailto:[email protected])** mailing list to report security vulnerabilities and any other concerns regarding the security aspects of the source code or any other resource in this repo.

security@ballerina.io: 0168 DA26 2989 0DB9 4ACD 8367 E683 061E 2F85 C381 [pgp.mit.edu](https://pgp.surfnet.nl/pks/lookup?op=vindex&fingerprint=on&search=0xE683061E2F85C381)
**WARNING:** To protect the end-user security, please do not use any other medium to report security vulnerabilities. Also, kindly refrain from disclosing the vulnerability details you come across with other individuals, in any forums, sites, or other groups - public or private before it’s mitigation actions and disclosure process are completed.

We will keep you informed of the progress towards a fix and disclosure of the vulnerability if reported issue is identified as a true positive. To protect the end-user security, these issues could be disclosed in other places only after it’s mitigation actions and disclosure process are completed.
Use the following key to send secure messages to security@ballerina.io:

**Warning:** Please do not create GitHub issues for security vulnerabilities. Further, kindly refrain from sharing the vulnerability details you come across with other individuals.
> security@ballerina.io: 0168 DA26 2989 0DB9 4ACD 8367 E683 061E 2F85 C381 [pgp.mit.edu](https://pgp.surfnet.nl/pks/lookup?op=vindex&fingerprint=on&search=0xE683061E2F85C381)
Also, use the following template when reporting vulnerabilities so that it contains all the required information and helps expedite the analysis and mitigation process.

- Vulnerable Ballerina artifacts(s) and version(s)
- Vulnerable Ballerina artifact(s) and version(s)
- Overview: High-level overview of the issue and self-assessed severity
- Description: Include the steps to reproduce
- Impact: Self-assessed impact
- Solution: Any proposed solution

We will keep you informed of the progress towards a fix and disclosure of the vulnerability if the reported issue is identified as a true positive.

## Handling a vulnerability

The below is an overview of the vulnerability handling process.

1. The user privately reports the vulnerability to [email protected]. (The initial response time will be less than 24 hours).
2. The WSO2 security team works privately with the user to fix the vulnerability and QA verifies the solution.
3. Apply the fix to the master branch and release a new version of the distribution if required.
1. The vulnerability will be reported privately to [email protected]. (The initial response time will be less than 24 hours).
2. The reported vulnerability gets fixed and the solution gets verified by the relevant teams at WSO2.
3. The fix gets applied to the master branch and a new version of the distribution gets released if required.
4. The reported user is kept updated on the progress of the process.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.ballerinalang.jvm.util.exceptions.RuntimeErrors;
import org.ballerinalang.jvm.values.ErrorValue;
import org.ballerinalang.jvm.values.MapValue;
import org.ballerinalang.jvm.values.StringValue;

import static java.lang.String.format;
import static org.ballerinalang.jvm.util.BLangConstants.MAP_LANG_LIB;
Expand All @@ -41,6 +42,56 @@
*/
public class MapUtils {

public static void handleMapStore(MapValue<StringValue, Object> mapValue, StringValue fieldName, Object value) {
BType mapType = mapValue.getType();
switch (mapType.getTag()) {
case TypeTags.MAP_TAG:
if (!TypeChecker.checkIsType(value, ((BMapType) mapType).getConstrainedType())) {
BType expType = ((BMapType) mapType).getConstrainedType();
BType valuesType = TypeChecker.getType(value);
throw BallerinaErrors.createError(getModulePrefixedReason(MAP_LANG_LIB,
INHERENT_TYPE_VIOLATION_ERROR_IDENTIFIER),
BLangExceptionHelper.getErrorMessage(RuntimeErrors.INVALID_MAP_INSERTION, expType,
valuesType));
}
mapValue.put(fieldName, value);
break;
case TypeTags.RECORD_TYPE_TAG:
BRecordType recType = (BRecordType) mapType;
//TODO: bstring - remove getValue
BField recField = recType.getFields().get(fieldName.getValue());
BType recFieldType;

if (recField != null) {
// If there is a corresponding field in the record, use it
recFieldType = recField.type;
} else if (recType.restFieldType != null) {
// If there isn't a corresponding field, but there is a rest field, use it
recFieldType = recType.restFieldType;
} else {
// If both of the above conditions fail, the implication is that this is an attempt to insert a
// value to a non-existent field in a closed record.
throw BallerinaErrors.createError(MAP_KEY_NOT_FOUND_ERROR,
//TODO: bstring - remove getValue after migrating error value
BLangExceptionHelper.getErrorMessage(RuntimeErrors.INVALID_RECORD_FIELD_ACCESS,
fieldName.getValue(), recType));
}

if (!TypeChecker.checkIsType(value, recFieldType)) {
BType valuesType = TypeChecker.getType(value);
throw BallerinaErrors.createError(getModulePrefixedReason(MAP_LANG_LIB,
INHERENT_TYPE_VIOLATION_ERROR_IDENTIFIER),
//TODO: bstring - remove getValue after migrating error value
BLangExceptionHelper.getErrorMessage(RuntimeErrors.INVALID_RECORD_FIELD_ADDITION,
fieldName.getValue(), recFieldType, valuesType));
}

mapValue.put(fieldName, value);
break;
}
}

@Deprecated
public static void handleMapStore(MapValue<String, Object> mapValue, String fieldName, Object value) {
BType mapType = mapValue.getType();
switch (mapType.getTag()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@ public StringValue concat(StringValue str) {
public String stringValue() {
return value;
}

@Override
public int hashCode() {
return value.hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,9 @@ public StringValue concat(StringValue str) {
public String stringValue() {
return value;
}

@Override
public int hashCode() {
return value.hashCode();
}
}
2 changes: 2 additions & 0 deletions cli/ballerina-packerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ dependencies {
implementation project(':docerina')
implementation 'com.moandjiezana.toml:toml4j'
implementation 'info.picocli:picocli'
implementation 'org.apache.commons:commons-compress:1.18'

testCompile 'org.testng:testng'
testCompile 'com.moandjiezana.toml:toml4j'

Expand Down
Loading

0 comments on commit bdde242

Please sign in to comment.