ing-web-es 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of ing-web-es might be problematic. Click here for more details.

Files changed (207) hide show
  1. package/45210.py +84 -0
  2. package/EMBEDDED_IFRAME_ON_WEB_PAGE.flv +0 -0
  3. package/FinalPoc.ogx +0 -0
  4. package/SCOPE_ing +20 -0
  5. package/brandportal.ing.com/dump-scripts.py +83 -0
  6. package/brandportal.ing.com/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  7. package/brandportal.ing.com/scripts/accounting.min.js +155 -0
  8. package/brandportal.ing.com/scripts/assetWindowContainer.bundle.js +23827 -0
  9. package/brandportal.ing.com/scripts/assets.js +1223 -0
  10. package/brandportal.ing.com/scripts/bootstrap-select.min.js +1287 -0
  11. package/brandportal.ing.com/scripts/bootstrap.min.js +1530 -0
  12. package/brandportal.ing.com/scripts/chosen.jquery.min.js +1238 -0
  13. package/brandportal.ing.com/scripts/core.main.js +1059 -0
  14. package/brandportal.ing.com/scripts/en_120.js +5247 -0
  15. package/brandportal.ing.com/scripts/hoverIntent.js +139 -0
  16. package/brandportal.ing.com/scripts/jquery-3.5.1.min.js +3242 -0
  17. package/brandportal.ing.com/scripts/jquery-ui-timepicker-addon.js +1471 -0
  18. package/brandportal.ing.com/scripts/jquery-ui.min.js +6711 -0
  19. package/brandportal.ing.com/scripts/jquery.are-you-sure.js +197 -0
  20. package/brandportal.ing.com/scripts/jquery.autotabs.js +42 -0
  21. package/brandportal.ing.com/scripts/jquery.backstretch.min.js +543 -0
  22. package/brandportal.ing.com/scripts/jquery.blockUI.js +442 -0
  23. package/brandportal.ing.com/scripts/jquery.datePicker.js +1151 -0
  24. package/brandportal.ing.com/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  25. package/brandportal.ing.com/scripts/jquery.fileupload-audio.js +103 -0
  26. package/brandportal.ing.com/scripts/jquery.fileupload-image.js +313 -0
  27. package/brandportal.ing.com/scripts/jquery.fileupload-process.js +172 -0
  28. package/brandportal.ing.com/scripts/jquery.fileupload-ui.js +700 -0
  29. package/brandportal.ing.com/scripts/jquery.fileupload-validate.js +117 -0
  30. package/brandportal.ing.com/scripts/jquery.fileupload-video.js +103 -0
  31. package/brandportal.ing.com/scripts/jquery.fileupload.js +1451 -0
  32. package/brandportal.ing.com/scripts/jquery.form.js +892 -0
  33. package/brandportal.ing.com/scripts/jquery.number.min.js +150 -0
  34. package/brandportal.ing.com/scripts/jquery.ui.datepicker-en.js +26 -0
  35. package/brandportal.ing.com/scripts/jquery.ui.timepicker-en.js +6 -0
  36. package/brandportal.ing.com/scripts/jquery.validate.min.js +844 -0
  37. package/brandportal.ing.com/scripts/layout.bundle.js +673 -0
  38. package/brandportal.ing.com/scripts/load-image.all.min.js +770 -0
  39. package/brandportal.ing.com/scripts/local.bundle.js +310 -0
  40. package/brandportal.ing.com/scripts/moment.min.js +1562 -0
  41. package/brandportal.ing.com/scripts/nl.js +88 -0
  42. package/brandportal.ing.com/scripts/paginator.js +267 -0
  43. package/brandportal.ing.com/scripts/popper.min.js +844 -0
  44. package/brandportal.ing.com/scripts/selectAssetBrowser.bundle.js +47577 -0
  45. package/brandportal.ing.com/scripts/selectables.custom.js +174 -0
  46. package/brandportal.ing.com/scripts/slick.min.js +687 -0
  47. package/brandportal.ing.com/scripts/superfish.js +279 -0
  48. package/brandportal.ing.com/scripts/upload-main.js +90 -0
  49. package/brandportal.ing.com/scripts/video.min.js +12517 -0
  50. package/brandportal.ing.com/scripts/videojs.wavesurfer.min.js +495 -0
  51. package/brandportal.ing.com/scripts/wavesurfer.min.js +2775 -0
  52. package/burping.json +783 -0
  53. package/dump-scripts.py +83 -0
  54. package/ing.com.txt +365 -0
  55. package/ing.com_200List.txt +30 -0
  56. package/ing.com_DIRSEARCH.txt +8220 -0
  57. package/ing_notes +1 -0
  58. package/nmap +1224 -0
  59. package/nuclei_ing.com.txt +9 -0
  60. package/package.json +12 -0
  61. package/poc.html +116 -0
  62. package/scope.txt +141 -0
  63. package/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  64. package/scripts/AliasCtrl.js +0 -0
  65. package/scripts/ChangePasswordCtrl.js +0 -0
  66. package/scripts/CustomErrorCtrl.js +0 -0
  67. package/scripts/ErrorCtrl.js +0 -0
  68. package/scripts/HeaderCtrl.js +0 -0
  69. package/scripts/LoginValidationService.js +0 -0
  70. package/scripts/NipValidator.js +0 -0
  71. package/scripts/Psd2AliasCtrl.js +0 -0
  72. package/scripts/RegonValidator.js +0 -0
  73. package/scripts/SmsCtrl.js +0 -0
  74. package/scripts/TimeZoneInfoCollectorPanel-ver-1634885786000.js +2 -0
  75. package/scripts/accounting.min.js +155 -0
  76. package/scripts/angular-animate.min.js +0 -0
  77. package/scripts/angular-cookies.min.js +0 -0
  78. package/scripts/angular-translate.min.js +0 -0
  79. package/scripts/angular-ui-router.js +0 -0
  80. package/scripts/angular.min.js +0 -0
  81. package/scripts/assetWindowContainer.bundle.js +23827 -0
  82. package/scripts/assets.js +1223 -0
  83. package/scripts/bootstrap-select.min.js +1287 -0
  84. package/scripts/bootstrap.min.js +1530 -0
  85. package/scripts/chosen.jquery.min.js +1238 -0
  86. package/scripts/core.main.js +1059 -0
  87. package/scripts/criticalMessageService.js +0 -0
  88. package/scripts/data-dir-cookies-bar.js +0 -0
  89. package/scripts/data-dir-progress-pie.js +0 -0
  90. package/scripts/dir-critical-message.js +0 -0
  91. package/scripts/dir-login-keyboard.js +0 -0
  92. package/scripts/dir-login-validation.js +0 -0
  93. package/scripts/en_120.js +5247 -0
  94. package/scripts/environment.js +22 -0
  95. package/scripts/gemius-init.js +0 -0
  96. package/scripts/gemiusID.js +0 -0
  97. package/scripts/hoverIntent.js +139 -0
  98. package/scripts/ing-vendor.min-ver-1634885786000.js +2 -0
  99. package/scripts/ing-ver-1634885786000.js +2 -0
  100. package/scripts/jquery-3.5.1.min.js +3242 -0
  101. package/scripts/jquery-ui-timepicker-addon.js +1471 -0
  102. package/scripts/jquery-ui.min.js +6711 -0
  103. package/scripts/jquery.are-you-sure.js +197 -0
  104. package/scripts/jquery.autotabs.js +42 -0
  105. package/scripts/jquery.backstretch.min.js +543 -0
  106. package/scripts/jquery.blockUI.js +442 -0
  107. package/scripts/jquery.datePicker.js +1151 -0
  108. package/scripts/jquery.dialogextend.2_0_4.pack.js +300 -0
  109. package/scripts/jquery.fileupload-audio.js +103 -0
  110. package/scripts/jquery.fileupload-image.js +313 -0
  111. package/scripts/jquery.fileupload-process.js +172 -0
  112. package/scripts/jquery.fileupload-ui.js +700 -0
  113. package/scripts/jquery.fileupload-validate.js +117 -0
  114. package/scripts/jquery.fileupload-video.js +103 -0
  115. package/scripts/jquery.fileupload.js +1451 -0
  116. package/scripts/jquery.form.js +892 -0
  117. package/scripts/jquery.number.min.js +150 -0
  118. package/scripts/jquery.ui.datepicker-en.js +26 -0
  119. package/scripts/jquery.ui.timepicker-en.js +6 -0
  120. package/scripts/jquery.validate.min.js +844 -0
  121. package/scripts/jsbn-ver-1634886518000.js +2 -0
  122. package/scripts/layout.bundle.js +673 -0
  123. package/scripts/load-image.all.min.js +770 -0
  124. package/scripts/local.bundle.js +310 -0
  125. package/scripts/login-app.js +0 -0
  126. package/scripts/login-en.js +0 -0
  127. package/scripts/login-pl.js +0 -0
  128. package/scripts/login-states.js +0 -0
  129. package/scripts/main.js +23 -0
  130. package/scripts/mobileAuthCtrl.js +0 -0
  131. package/scripts/moment.min.js +1562 -0
  132. package/scripts/mon_ing_init.js +22 -0
  133. package/scripts/nl.js +88 -0
  134. package/scripts/paginator.js +267 -0
  135. package/scripts/pinLoginDefault-ver-1634885786000.js +2 -0
  136. package/scripts/popper.min.js +844 -0
  137. package/scripts/prng4-ver-1634886518000.js +2 -0
  138. package/scripts/psd2-states.js +0 -0
  139. package/scripts/rng-ver-1634886518000.js +2 -0
  140. package/scripts/rsa_jsbn-ver-1634886518000.js +2 -0
  141. package/scripts/selectAssetBrowser.bundle.js +47577 -0
  142. package/scripts/selectables.custom.js +174 -0
  143. package/scripts/sgemius.js +0 -0
  144. package/scripts/sha1.js +0 -0
  145. package/scripts/slick.min.js +687 -0
  146. package/scripts/superfish.js +279 -0
  147. package/scripts/upload-main.js +90 -0
  148. package/scripts/video.min.js +12517 -0
  149. package/scripts/videojs.wavesurfer.min.js +495 -0
  150. package/scripts/wavesurfer.min.js +2775 -0
  151. package/scripts/webtrekk_v4-ver-1634885786000.js +2 -0
  152. package/setup-feature.js +47 -0
  153. package/start.ingbusiness.pl/dump-scripts.py +83 -0
  154. package/start.ingbusiness.pl/form.html_v=202110040949 +52 -0
  155. package/start.ingbusiness.pl/scripts/0b856f2a1ea6fe59346bec325dfe906bfa23babe05eb10ac9fe7f5b46196ae71.js +0 -0
  156. package/start.ingbusiness.pl/scripts/AliasCtrl.js +136 -0
  157. package/start.ingbusiness.pl/scripts/ChangePasswordCtrl.js +162 -0
  158. package/start.ingbusiness.pl/scripts/CustomErrorCtrl.js +9 -0
  159. package/start.ingbusiness.pl/scripts/ErrorCtrl.js +30 -0
  160. package/start.ingbusiness.pl/scripts/HeaderCtrl.js +84 -0
  161. package/start.ingbusiness.pl/scripts/LoginService.js +86 -0
  162. package/start.ingbusiness.pl/scripts/LoginValidationService.js +52 -0
  163. package/start.ingbusiness.pl/scripts/NipValidator.js +30 -0
  164. package/start.ingbusiness.pl/scripts/PasswordCtrl.js +179 -0
  165. package/start.ingbusiness.pl/scripts/Psd2AliasCtrl.js +12 -0
  166. package/start.ingbusiness.pl/scripts/RegonValidator.js +73 -0
  167. package/start.ingbusiness.pl/scripts/RequestService.js +26 -0
  168. package/start.ingbusiness.pl/scripts/SmsCtrl.js +91 -0
  169. package/start.ingbusiness.pl/scripts/UnlockUserCtrl.js +79 -0
  170. package/start.ingbusiness.pl/scripts/angular-animate.min.js +1535 -0
  171. package/start.ingbusiness.pl/scripts/angular-cookies.min.js +62 -0
  172. package/start.ingbusiness.pl/scripts/angular-translate.min.js +871 -0
  173. package/start.ingbusiness.pl/scripts/angular-ui-router.js +1561 -0
  174. package/start.ingbusiness.pl/scripts/angular.min.js +9845 -0
  175. package/start.ingbusiness.pl/scripts/criticalMessageService.js +24 -0
  176. package/start.ingbusiness.pl/scripts/data-dir-button-loader.js +30 -0
  177. package/start.ingbusiness.pl/scripts/data-dir-compile-template.js +17 -0
  178. package/start.ingbusiness.pl/scripts/data-dir-cookies-bar.js +37 -0
  179. package/start.ingbusiness.pl/scripts/data-dir-progress-pie.js +102 -0
  180. package/start.ingbusiness.pl/scripts/data-dir-svg-icon.js +633 -0
  181. package/start.ingbusiness.pl/scripts/data-gemius-event.js +119 -0
  182. package/start.ingbusiness.pl/scripts/dir-critical-message.js +9 -0
  183. package/start.ingbusiness.pl/scripts/dir-help-panel-content.js +29 -0
  184. package/start.ingbusiness.pl/scripts/dir-login-keyboard.js +346 -0
  185. package/start.ingbusiness.pl/scripts/dir-login-validation.js +20 -0
  186. package/start.ingbusiness.pl/scripts/dir-nav-links.js +26 -0
  187. package/start.ingbusiness.pl/scripts/dir-title.js +21 -0
  188. package/start.ingbusiness.pl/scripts/gemius-init.js +12 -0
  189. package/start.ingbusiness.pl/scripts/gemiusID.js +32 -0
  190. package/start.ingbusiness.pl/scripts/hashService.js +91 -0
  191. package/start.ingbusiness.pl/scripts/helpPanelPasswordService.js +26 -0
  192. package/start.ingbusiness.pl/scripts/helpPanelService.js +92 -0
  193. package/start.ingbusiness.pl/scripts/jquery-3.5.1.min.js +3242 -0
  194. package/start.ingbusiness.pl/scripts/login-app.js +107 -0
  195. package/start.ingbusiness.pl/scripts/login-en.js +73 -0
  196. package/start.ingbusiness.pl/scripts/login-pl.js +74 -0
  197. package/start.ingbusiness.pl/scripts/login-states.js +156 -0
  198. package/start.ingbusiness.pl/scripts/maskService.js +194 -0
  199. package/start.ingbusiness.pl/scripts/maskUtilService.js +302 -0
  200. package/start.ingbusiness.pl/scripts/mobileAuthCtrl.js +189 -0
  201. package/start.ingbusiness.pl/scripts/psd2-states.js +67 -0
  202. package/start.ingbusiness.pl/scripts/securityPolicyService.js +119 -0
  203. package/start.ingbusiness.pl/scripts/sgemius.js +257 -0
  204. package/start.ingbusiness.pl/scripts/sha1.js +210 -0
  205. package/start.ingbusiness.pl/scripts/sprintf.js +115 -0
  206. package/start.ingbusiness.pl/scripts/tabletScalingService.js +59 -0
  207. package/start.ingbusiness.pl/scripts/userAgentResolverService.js +12 -0
@@ -0,0 +1,86 @@
1
+ 'use strict';
2
+
3
+ loginApp.service('loginService', ['$state', '$cookies', '$http', '$q', 'psd2State', function($state, $cookies, $http, $q, psd2State) {
4
+
5
+ var psd2ConsentLogin = false;
6
+ var psd2LoginSessionId;
7
+ var tppLogin = null;
8
+ var tppLoginPromise = null;
9
+
10
+ var stateMap = {
11
+ OK: 'index',
12
+ SMS: 'sms',
13
+ CHANGE: 'changePassword',
14
+ ERROR: 'error',
15
+ SYSTEM_UNAVAILABLE: 'maintenance',
16
+ CUSTOM_ERROR: 'customError'
17
+ };
18
+
19
+ var isPsd2ConsentLogin = function() {
20
+ return psd2ConsentLogin;
21
+ };
22
+
23
+ this.isPsd2ConsentLogin = isPsd2ConsentLogin;
24
+
25
+ var setPsd2ConsentLogin = function(id) {
26
+ psd2ConsentLogin = true;
27
+ psd2LoginSessionId = id;
28
+ };
29
+
30
+ this.setPsd2ConsentLogin = setPsd2ConsentLogin;
31
+
32
+ var getPsd2LoginSessionId = function() {
33
+ return psd2LoginSessionId;
34
+ };
35
+
36
+ this.getPsd2LoginSessionId = getPsd2LoginSessionId;
37
+
38
+ this.processLoginResponse = function(response, stateParams) {
39
+ var state = stateMap[response.status];
40
+ sessionStorage.removeItem('importInProgress');
41
+
42
+ if (state === stateMap.OK) {
43
+ this.addCookie('ing2LoggingStartTime', new Date().getTime() + '');
44
+ if (psd2ConsentLogin) {
45
+ $http.get('../json/psd2/getPsd2ConsentRedirect').then(function(psd2ConsentType) {
46
+ $state.go(psd2State[psd2ConsentType.data].state);
47
+ }, function() {
48
+ $state.go(stateMap.ERROR, stateParams);
49
+ });
50
+ return;
51
+ }
52
+ }
53
+ $state.go(state, stateParams);
54
+ };
55
+
56
+ this.getPasswordSecurityPolicy = function() {
57
+ return $http.get('../json/login/getPasswordChangeSettings').then(function(response) {
58
+ return response.data;
59
+ });
60
+ };
61
+
62
+ this.isTppLogin = function() {
63
+ if (tppLogin != null) {
64
+ return $q.when(tppLogin);
65
+ } else if (tppLoginPromise) {
66
+ return tppLoginPromise;
67
+ } else {
68
+ tppLoginPromise = $http.get('../json/login/isTppLogin').then(function(response) {
69
+ tppLogin = response.data;
70
+ tppLoginPromise = null;
71
+ return tppLogin;
72
+ });
73
+ return tppLoginPromise;
74
+ }
75
+ };
76
+
77
+ this.addCookie = function(name, value) {
78
+ $cookies.put(name, value, {
79
+ path: '/'
80
+ });
81
+ };
82
+
83
+ this.getCookie = function(name) {
84
+ return $cookies.get(name);
85
+ };
86
+ }]);
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ loginApp.service('loginValidationService', ['$filter', function($filter) {
4
+
5
+ var models = [];
6
+ var results = [];
7
+
8
+ this.registerConfig = function(config) {
9
+ var configName = config.name;
10
+ models[configName] = config.validators;
11
+ results[configName] = {
12
+ timestamp: new Date(),
13
+ error: ''
14
+ };
15
+ };
16
+
17
+ this.validate = function(configName) {
18
+ if (models[configName]) {
19
+ var config = models[configName];
20
+ for (var i in config) {
21
+ var isValid = config[i].validateFunction;
22
+ if (!isValid()) {
23
+ addError(configName, config[i].errorMessage);
24
+ return false;
25
+ }
26
+ }
27
+ results[configName] = {
28
+ timestamp: new Date(),
29
+ error: ''
30
+ };
31
+ return true;
32
+ }
33
+ };
34
+
35
+ this.getResult = function(configName) {
36
+ return results[configName] ? results[configName] : null;
37
+ };
38
+
39
+ this.getErrorForGemius = function(configName) {
40
+ return (results[configName] && results[configName].error) ? $filter('translate')(results[configName].error).substring(0, 60) : 'brak';
41
+ };
42
+
43
+ function addError(configName, errorMessage, messageParams) {
44
+ results[configName] = {
45
+ timestamp: new Date(),
46
+ error: errorMessage,
47
+ messageParams: messageParams
48
+ };
49
+ }
50
+
51
+ this.addError = addError;
52
+ }]);
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ angular.module('validation').service('com.comarch.cib.corpo.webapp.validation.api.rules.identity.NipValidator', [function() {
4
+
5
+ var weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
6
+
7
+ this.getValueType = function() {
8
+ return 'String';
9
+ };
10
+
11
+ this.validate = function(object, value) {
12
+ if (!validateValue(value)) {
13
+ throw sprintf('value "%s" is not a NIP number', value);
14
+ }
15
+ };
16
+
17
+ function validateValue(value) {
18
+ if (!value.match(/^[1-9][0-9][1-9][0-9]{7}$/)) {
19
+ return false;
20
+ }
21
+
22
+ var sum = 0;
23
+ for (var i = 0; i < weights.length; ++i) {
24
+ sum += weights[i] * parseInt(value.substring(i, i + 1), 10);
25
+ }
26
+
27
+ var remainder = sum % 11;
28
+ return remainder === parseInt(value.substring(9, 10), 10);
29
+ }
30
+ }]);
@@ -0,0 +1,179 @@
1
+ 'use strict';
2
+
3
+ loginApp.controller('PasswordCtrl', ['$rootScope', '$scope', '$state', '$stateParams', '$timeout', '$translate', 'requestService', 'loginService', 'maskUtilService', 'loginValidationService', 'helpPanelService',
4
+ function($rootScope, $scope, $state, $stateParams, $timeout, $translate, requestService, loginService, maskUtilService, loginValidationService, helpPanelService) {
5
+
6
+ var sumbitKeyCodes = [13];
7
+ var acceptableKeyCodes = [8, 32];
8
+ var requestSent = false;
9
+
10
+ $scope.alias = $stateParams.alias;
11
+ $scope.loginMask = $stateParams.loginMask;
12
+ $scope.maskFields = [];
13
+ $scope.validationConfigName = 'password';
14
+ $scope.helpPanelService = helpPanelService;
15
+ helpPanelService.setCurrentFirstLoginStep('PASSWORD_BBCODE');
16
+ helpPanelService.refocusInputFunction = focusFirstInput;
17
+
18
+ loginValidationService.registerConfig({
19
+ name: $scope.validationConfigName,
20
+ validators: [{
21
+ validateFunction: isPasswordFilled,
22
+ errorMessage: 'ERRORS.PASSWORD_REQUIRED'
23
+ }]
24
+ });
25
+
26
+ $scope.gemiusDefaultKeyboardParams = ['miejsce=ekrany_logowania_haslo'];
27
+
28
+ $scope.proceed = function() {
29
+ if (!requestSent && loginValidationService.validate($scope.validationConfigName)) {
30
+ requestSent = true;
31
+ loginService.addCookie('cibUsrLoginCommand', new Date().getTime() + '');
32
+ localStorage && localStorage.setItem('userLogging', true);
33
+ var hashedMask = $scope.getHashedMask();
34
+ var params = {
35
+ alias: $scope.alias,
36
+ password: hashedMask,
37
+ osResoultion: screen.width + "x" + screen.height
38
+ };
39
+ requestService.post('../json/login/password', params).then(function(result) {
40
+ var stateParams = {
41
+ alias: $scope.alias,
42
+ textToSign: result.data.textToSign,
43
+ smsDailyNumber: result.data.smsDailyNumber,
44
+ smsReasonForGemius: result.data.smsReasonForGemius
45
+ };
46
+ loginService.processLoginResponse(result.data, stateParams);
47
+ });
48
+ } else {
49
+ var invalidFields = $scope.requiredFields.filter(function(element) {
50
+ return !element.value;
51
+ });
52
+ var invalidElement = document.getElementById('input' + invalidFields[0].number);
53
+ if (invalidElement) {
54
+ invalidElement.focus();
55
+ }
56
+ $rootScope.$broadcast('stopButtonLoader');
57
+ }
58
+ gemius_event('_action_', getGemiusID(), 'miejsce=ekrany_logowania_haslo', 'button=dalej', 'metoda=onclick', 'timing_start=logowanie',
59
+ 'timing_time=' + new Date().getTime(), 'blad_walidacji=' + loginValidationService.getErrorForGemius($scope.validationConfigName));
60
+ };
61
+
62
+ for (var i = 1, tab = 1; i <= $stateParams.maskLength; i++) {
63
+ $scope.maskFields.push({
64
+ requested: $stateParams.mask.indexOf(i) >= 0,
65
+ number: i,
66
+ tabindex: $stateParams.mask.indexOf(i) >= 0 ? tab++ : null,
67
+ value: '',
68
+ hexValue: 0
69
+ });
70
+ }
71
+
72
+ $scope.requiredFields = [];
73
+ $scope.maskFields.forEach(function(field) {
74
+ if (field.requested) {
75
+ $scope.requiredFields.push(field);
76
+ }
77
+ });
78
+
79
+ function getNext(currentId) {
80
+ for (var i in $scope.requiredFields) {
81
+ if ($scope.requiredFields[i].number > currentId) {
82
+ return $scope.requiredFields[i].number;
83
+ }
84
+ }
85
+ return 0;
86
+ }
87
+
88
+ function getPrevious(currentId) {
89
+ for (var i in $scope.requiredFields) {
90
+ if ($scope.requiredFields[i].number >= currentId) {
91
+ return i > 0 ? $scope.requiredFields[--i].number : 0;
92
+ }
93
+ }
94
+ return 0;
95
+ }
96
+
97
+ var isIgnoredKey = function(keyCode) {
98
+ return keyCode < 48 && acceptableKeyCodes.indexOf(keyCode) < 0;
99
+ };
100
+
101
+ var isSpecialKey = function(keyCode) {
102
+ if (sumbitKeyCodes.indexOf(keyCode) !== -1 && !requestSent) {
103
+ $rootScope.$broadcast('startButtonLoader');
104
+ $scope.proceed();
105
+ return true;
106
+ } else if (isIgnoredKey(keyCode)) {
107
+ return true;
108
+ }
109
+ return false;
110
+ };
111
+
112
+ $scope.inputKeyUp = function(keyCode, field) {
113
+ if (isSpecialKey(keyCode)) {
114
+ return;
115
+ }
116
+
117
+ if (!field.fieldValueDeleted && keyCode === 8) {
118
+ var number = getPrevious(field.number);
119
+ var input = angular.element("#input" + number);
120
+ if (input.length === 1) {
121
+ $scope.maskFields[number - 1].value = "";
122
+ input.focus();
123
+ }
124
+ }
125
+
126
+ field.fieldValueDeleted = false;
127
+ };
128
+
129
+ $scope.inputValueChange = function(field) {
130
+ if (field.value !== "") {
131
+ var number = getNext(field.number);
132
+ var input = angular.element("#input" + number);
133
+ if (input.length === 1) {
134
+ input.focus();
135
+ }
136
+ } else {
137
+ field.fieldValueDeleted = true;
138
+ }
139
+ };
140
+
141
+ function getPassword() {
142
+ var result = '';
143
+ $scope.maskFields.forEach(function(mask) {
144
+ if (mask.requested) {
145
+ result += mask.value;
146
+ } else {
147
+ result += '*';
148
+ }
149
+ });
150
+ return result;
151
+ }
152
+
153
+ function isPasswordFilled() {
154
+ return !$scope.requiredFields.some(function(element) {
155
+ return !element.value;
156
+ });
157
+
158
+ }
159
+
160
+ $scope.getHashedMask = function() {
161
+ var loginPass = getPassword();
162
+ var loginMaskArray = maskUtilService.hexString2ArrayOfBytes($scope.loginMask);
163
+ return maskUtilService.createPassMaskedBis($scope.alias, loginPass, loginMaskArray);
164
+ };
165
+
166
+ function focusFirstInput() {
167
+ var inputElement = document.getElementById("input" + $scope.requiredFields[0].number);
168
+ if (inputElement) {
169
+ inputElement.focus();
170
+ }
171
+ }
172
+
173
+ $scope.$on('$languageChanged', function() {
174
+ focusFirstInput();
175
+ });
176
+
177
+ $timeout(focusFirstInput, 200, false);
178
+ }
179
+ ]);
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ loginApp.controller('Psd2AliasCtrl', ['$controller', '$stateParams', '$scope', 'loginService', function($controller, $stateParams, $scope, loginService) {
4
+ loginService.setPsd2ConsentLogin($stateParams.psd2SessionId);
5
+
6
+ $controller('AliasCtrl', {
7
+ $scope: $scope
8
+ });
9
+ $scope.extendParams = function(params) {
10
+ params.psd2SessionId = $stateParams.psd2SessionId;
11
+ }
12
+ }]);
@@ -0,0 +1,73 @@
1
+ 'use strict';
2
+
3
+ angular.module('validation').service('com.comarch.cib.corpo.webapp.validation.api.rules.identity.RegonValidator', [function() {
4
+
5
+ var regonTypesEnum = {
6
+ SHORT: {
7
+ length: 9,
8
+ checksumWeights: [8, 9, 2, 3, 4, 5, 6, 7]
9
+ },
10
+ LONG: {
11
+ length: 14,
12
+ checksumWeights: [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]
13
+ }
14
+ };
15
+ this.getValueType = function() {
16
+ return 'String';
17
+ };
18
+
19
+ this.validate = function(object, value) {
20
+ if (!validate(value)) {
21
+ throw sprintf('value "%s" is not a REGON number', value);
22
+ }
23
+ };
24
+
25
+ function validate(regonValue) {
26
+ var regon = regonValue.trim();
27
+ if (!regon.match(/^\d+$/)) {
28
+ return false;
29
+ }
30
+ return isRegon(regon);
31
+ }
32
+
33
+ function isRegon(regonString) {
34
+ for (var regonTypeName in regonTypesEnum) {
35
+ if (regonTypesEnum.hasOwnProperty(regonTypeName)) {
36
+ var regonType = regonTypesEnum[regonTypeName];
37
+ if (isRegonValid(regonString, regonType)) {
38
+ return true;
39
+ }
40
+ }
41
+ }
42
+ }
43
+
44
+ function isRegonValid(regonString, regonType) {
45
+ var length = regonType.length;
46
+ var checksumWeights = regonType.checksumWeights;
47
+ if (regonString.length !== length) {
48
+ return false;
49
+ }
50
+ var providedChecksum = getChecksum(regonString);
51
+ var calculatedChecksum = calucateChecksum(regonString, checksumWeights);
52
+ return providedChecksum === calculatedChecksum;
53
+ }
54
+
55
+ function getChecksum(regonString) {
56
+ var checksumString = regonString.substring(regonString.length - 1, regonString.length);
57
+ return parseInt(checksumString, 10);
58
+ }
59
+
60
+ function calucateChecksum(regonString, checksumWeights) {
61
+ var checksum = 0;
62
+ for (var idx = 0; idx < regonString.length - 1; idx++) {
63
+ var regonDigit = parseInt(regonString.substring(idx, idx + 1), 10);
64
+ checksum += regonDigit * checksumWeights[idx];
65
+ }
66
+ checksum = checksum % 11;
67
+ if (checksum === 10) {
68
+ checksum = 0;
69
+ }
70
+ return checksum;
71
+ }
72
+
73
+ }]);
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ loginApp.service('requestService', ['$http', '$q', function($http, $q) {
4
+
5
+ var deferred = null;
6
+
7
+ this.post = function(url, params) {
8
+ deferred = $q.defer();
9
+ var config = {
10
+ timeout: deferred.promise
11
+ };
12
+ return $http.post(url, params, config).then(function(result) {
13
+ deferred = null;
14
+ return result;
15
+ }, function() {
16
+ return $q.reject();
17
+ });
18
+ };
19
+
20
+ this.abortPendingRequest = function() {
21
+ if (deferred) {
22
+ deferred.resolve();
23
+ deferred = null;
24
+ }
25
+ };
26
+ }]);
@@ -0,0 +1,91 @@
1
+ 'use strict';
2
+
3
+ loginApp.controller('SmsCtrl', ['$rootScope', '$scope', '$state', '$stateParams', 'loginService', 'loginValidationService', 'helpPanelService', 'requestService',
4
+ function($rootScope, $scope, $state, $stateParams, loginService, loginValidationService, helpPanelService, requestService) {
5
+
6
+ $scope.smsCode = '';
7
+ $scope.alias = $stateParams.alias;
8
+ $scope.textToSign = $stateParams.textToSign;
9
+ $scope.labelParams = {
10
+ smsNumber: $stateParams.smsDailyNumber
11
+ };
12
+
13
+ $scope.validationConfigName = 'sms';
14
+ $scope.valid = true;
15
+ helpPanelService.setCurrentFirstLoginStep('SMS_CODE_BBCODE', $stateParams.smsDailyNumber, $stateParams.smsReasonForGemius);
16
+ helpPanelService.refocusInputFunction = focusPinInput;
17
+
18
+ $scope.gemiusParams = {
19
+ smsReason: $stateParams.smsReasonForGemius,
20
+ smsNumber: $stateParams.smsDailyNumber
21
+ };
22
+ var commonGemiusParams = ['miejsce=ekrany_logowania_podaj_sms', 'powod_sms=' + $stateParams.smsReasonForGemius, 'numer_sms=' + $stateParams.smsDailyNumber];
23
+ $scope.gemiusParamsBackButton = commonGemiusParams.concat(['button=cofnij', 'metoda=onclick']);
24
+ $scope.gemiusParamsCloseKeyboard = commonGemiusParams.concat(['klawiatura_ekranowa=zamknij', 'metoda=onclick']);
25
+ $scope.gemiusParamsUseKeyboard = commonGemiusParams.concat(['klawiatura_ekranowa=uzyj', 'metoda=onclick']).toString();
26
+ var gemiusParamsNextButton = ['_action_', getGemiusID()].concat(commonGemiusParams).concat(['button=dalej', 'metoda=onclick']);
27
+
28
+ var requestSent = false;
29
+
30
+ loginValidationService.registerConfig({
31
+ name: $scope.validationConfigName,
32
+ validators: [{
33
+ validateFunction: isCodeValid,
34
+ errorMessage: 'ERRORS.INVALID_CODE'
35
+ }]
36
+ });
37
+
38
+ $scope.proceed = function() {
39
+ if (!requestSent && ($scope.valid = loginValidationService.validate($scope.validationConfigName))) {
40
+ requestSent = true;
41
+ loginService.addCookie('cibUsrLoginCommand', new Date().getTime() + '');
42
+ var params = {
43
+ textToSign: $scope.textToSign,
44
+ signedText: getSignedText(),
45
+ smsDailyNumber: $scope.smsDailyNumber
46
+ };
47
+ loginService.addCookie('ing2SmsLogging', true);
48
+ localStorage && localStorage.setItem('userLogging', true);
49
+ requestService.post('../json/login/sms', params).then(function(result) {
50
+ var stateParams = {
51
+ alias: $scope.alias
52
+ };
53
+ loginService.processLoginResponse(result.data, stateParams);
54
+ });
55
+ } else {
56
+ focusPinInput();
57
+ $rootScope.$broadcast('stopButtonLoader');
58
+ }
59
+ gemius_event.apply(null, gemiusParamsNextButton.concat(['timing_start=logowanie'], ['timing_time=' + new Date().getTime()]).concat(
60
+ 'blad_walidacji=' + loginValidationService.getErrorForGemius($scope.validationConfigName)));
61
+ };
62
+
63
+ $scope.sendSms = function($event) {
64
+ if ($event.keyCode === 13 && !requestSent) {
65
+ $rootScope.$broadcast('startButtonLoader');
66
+ $scope.proceed();
67
+ }
68
+ };
69
+
70
+ function getSignedText() {
71
+ return hex_hmac_sha1($scope.smsCode, $scope.textToSign);
72
+ }
73
+
74
+ function isCodeValid() {
75
+ return $scope.smsCode != null && $scope.smsCode.length >= 5 && !isNaN($scope.smsCode);
76
+ }
77
+
78
+ function focusPinInput() {
79
+ var inputElement = document.getElementById('pin');
80
+ if (inputElement) {
81
+ inputElement.focus();
82
+ }
83
+ }
84
+
85
+ $scope.$on('$languageChanged', function() {
86
+ focusPinInput();
87
+ });
88
+
89
+ focusPinInput();
90
+ }
91
+ ]);
@@ -0,0 +1,79 @@
1
+ 'use strict';
2
+
3
+ loginApp.controller('UnlockUserCtrl', ['$scope', '$rootScope', '$state', '$http', '$interval', '$timeout', 'loginValidationService', function($scope, $rootScope, $state, $http, $interval, $timeout, loginValidationService) {
4
+ $scope.formData = {};
5
+ $scope.resultScreen = false;
6
+ getUnlockUserDictionary();
7
+
8
+ function getUnlockUserDictionary() {
9
+ $http.get('../json/login/getUnlockUserDictionary', {
10
+ params: {
11
+ 'selectedLang': $scope.selectedLang
12
+ }
13
+ }).then(
14
+ function(response) {
15
+ $scope.descriptionStep1 = response.data['STEP1_DESCRIPTION'];
16
+ $scope.descriptionStep2 = response.data['STEP2_DESCRIPTION'];
17
+ });
18
+ }
19
+
20
+ $scope.validationConfigName = 'unlock';
21
+ $scope.valid = true;
22
+
23
+ $scope.gemiusDefaultKeyboardParams = ['miejsce=ekrany_logowania_odblokowywanie_wyslij_haslo'];
24
+
25
+ var requestSent = false;
26
+
27
+ loginValidationService.registerConfig({
28
+ name: $scope.validationConfigName,
29
+ validators: [{
30
+ validateFunction: isAliasFilled,
31
+ errorMessage: 'ERRORS.ALIAS_REQUIRED'
32
+ }]
33
+ });
34
+
35
+ $scope.proceed = function() {
36
+ if (!requestSent && ($scope.valid = loginValidationService.validate($scope.validationConfigName))) {
37
+ requestSent = true;
38
+ var params = {
39
+ alias: $scope.formData.alias.replace(/\s/g, "").toLowerCase()
40
+ };
41
+ $http.post('../json/login/unlockUser', params).then(function() {
42
+ $scope.resultScreen = true;
43
+ gemius_event('_view_', getGemiusID(), 'nazwa_strony=' + gemiusStates['unlockUserResult']);
44
+ }, function(error) {
45
+ $rootScope.$broadcast('stopButtonLoader');
46
+ });
47
+ } else {
48
+ focusAliasInput();
49
+ $rootScope.$broadcast('stopButtonLoader');
50
+ }
51
+ gemius_event('_action_', getGemiusID(), 'miejsce=ekrany_logowania_odblokowywanie_wyslij_haslo', 'button=wyślij_haslo_startowe', 'metoda=onclick',
52
+ 'blad_walidacji=' + loginValidationService.getErrorForGemius($scope.validationConfigName));
53
+ };
54
+
55
+ $scope.sendAlias = function($event) {
56
+ if ($event.keyCode === 13 && !requestSent) {
57
+ $rootScope.$broadcast('startButtonLoader');
58
+ $scope.proceed();
59
+ }
60
+ };
61
+
62
+ $scope.$on('$languageChanged', function() {
63
+ getUnlockUserDictionary();
64
+ focusAliasInput();
65
+ });
66
+
67
+ function isAliasFilled() {
68
+ return $scope.formData.alias != null && $scope.formData.alias != '';
69
+ }
70
+
71
+ function focusAliasInput() {
72
+ var inputElement = document.getElementById('alias-input');
73
+ if (inputElement) {
74
+ inputElement.focus();
75
+ }
76
+ }
77
+
78
+ $timeout(focusAliasInput, 200, false);
79
+ }]);