Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-Credentials-74d3274e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "Credentials",
"description": "SDK will throw if shared ini file's profile name can be resolved to __proto__"
}
5 changes: 5 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ var util = {
var section = line.match(/^\s*\[([^\[\]]+)\]\s*$/);
if (section) {
currentSection = section[1];
if (currentSection === '__proto__' || currentSection.split(/\s/)[1] === '__proto__') {
throw util.error(
new Error('Cannot load profile name \'' + currentSection + '\' from shared ini file.')
);
}
} else if (currentSection) {
var item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);
if (item) {
Expand Down
31 changes: 27 additions & 4 deletions test/util.spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.