Skip to content

Commit ef2dda8

Browse files
authored
Merge pull request #1626 from jet86/patch-1
Add 172.16 /12 as Private IP Range
2 parents b781745 + 5f26de5 commit ef2dda8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/static/app/js/components/SharePopup.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@ class SharePopup extends React.Component{
122122
showLocalLinkAlert = () => {
123123
const link = new URL(Utils.absoluteUrl("/")).hostname;
124124
return !this.state.localLinkAlertDismissed &&
125-
(link.indexOf("localhost") === 0 ||
126-
link.indexOf("192.168.") === 0 ||
127-
link.indexOf("0.0.0.0") === 0 ||
125+
(link.indexOf("0.0.0.0") === 0 ||
126+
link.indexOf("localhost") === 0 ||
128127
link.indexOf("127.0.0.1") === 0 ||
129128
link.indexOf("10.") === 0 ||
129+
(link.indexOf("172.") === 0 && parseInt(link.split(".")[1], 10) >= 16 && parseInt(link.split(".")[1], 10) <= 31) ||
130+
link.indexOf("192.168.") === 0 ||
130131
link.indexOf("::1") === 0);
131132
}
132133

@@ -238,4 +239,4 @@ class SharePopup extends React.Component{
238239
}
239240
}
240241

241-
export default SharePopup;
242+
export default SharePopup;

0 commit comments

Comments
 (0)