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
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ Using getRowCount method of GlideRecord can cause performance issues while queri
### Query business rules should not use query() on GlideRecord
Query business rules that query themselves will continue to loop indefinitely until being caught by the platforms recursion limit. This can build up to an excessive response time and possibly cause the transaction to time out or create performance issues.

### Always deregister $rootScope.$on listeners on the scope $destory event
$rootScope.$on listeners will remain in memory if not properly cleaned up. This will create a memory leak if the controller falls out of scope.
```javascript
api.controller = function ($rootScope, $scope) {
/* widget controller */
var c = this;

var deregister = $rootScope.$on("someevent", function () {});

$scope.$on("$destroy", function destroyScope() {
deregister();
});
};
```

## Category: Security

### Tables without ACLs
Expand Down
2 changes: 1 addition & 1 deletion ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pAcfdvfkVBvdcNK_HZ6Siz27BK483rysXEEssjGG27O7HfaiuDjvSeRhd0EZeVUudSzZU3oflCzpya9lTPGvDX8xgLV8BWFmL28KpbfEO9wDhxF3vjVDzgTvgZvMxTWLDKnni98ffRF_Fq1G8VDsxnVPHbv_zZSqg_uHdNPqSkKQFMJqID-neTU1JafKdsy5ugT-D7ES8hizMmLyhvApTtXYOArMEjy20glEcvh5TjcIA1u5bCRdoykZ2x79e0zcKCE76z3i7OO2ryCkiYpkIApRPOu3Z_tTcYnzQHssAekDqNtqWnsHt_QBTA9Jcpjlg48GXm47o13_1EiTQeO6XV-gl-ahpZdlBsqBIwMDiLKSveC9m2Un5s8kIz0Jq8tdhiJgiqmyP8MR2yPyYT5NkcB8OCDSn-MyIHI0ROLvKZd88WhN-jU4YGmGMdL2D-QQHnir6CXIW-uXOZ00FF6snv89TqARUGM7DJg3VL1t1uVCa8nmJQ53YKNg9C-3hC4fdZ_uB1ynKFcoAKROPTyCD58PnQHfMjDYG3BqEa-apGBAo3XsU0zI1wdS00Ia4kS1TcV4kozt_SZJZVYIPEpJ262IKgnxuOQQjDN4J6DVitEeBuefiClEGRCbIHzdyUiLvoI8Wv2gQ0a00MRkmi3ReOT1MNSYL3ODnvaNL_gdZho
pAcfdvfkVBvdcNK_HZ6Siz27BK483rysXEEssjGG27O7HfaiuDjvSeRhd0EZeVUudSzZU3oflCzpya9lTPGvDX8xgLV8BWFmL28KpbfEO9wDhxF3vjVDzgTvgZvMxTWLDKnni98ffRF_Fq1G8VDsxnVPHbv_zZSqg_uHdNPqSkKQFMJqID-neTU1JafKdsy5ugT-D7ES8hizMmLyhvApTtXYOArMEjy20glEcvh5TjcIA1u5bCRdoykZ2x79e0zcKCE76z3i7OO2ryCkiYpkIApRPOu3Z_tTcYnzQHssAekDqNtqWnsHt_QBTA9Jcpjlg48GXm47o13_1EiTQeO6XV-gl-ahpZdlBsqBIwMDiLKSveC9m2Un5s8kIz0Jq8tdhiJgiqmyP8MR2yPyYT5NkcB8OCDSn-MyIHI0ROLvKZd88WhN-jU4YGmGMdL2D-QQHnir6CXIW-uXOZ00FF6snv89TqARUGM7DJg3VL1t1uVCa8nmJQ53YKNg9C-3hC4fdZ_uB1ynKFcoAKROPTyCD58PnQHfMjDYG3BqEa-apGBAo3XsU0zI1wdS00Ia4kS1TcV4kozt_SZJZVYIPEpJ262IKgnxuOQQjDN4J6DVitEeBuefiClEGRCbIHzdyUiLvoI8Wv2gQ0a00MRkmi3ReOT1MNSYL3ODnvaNL_gdZho
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
<scan_table_check action="INSERT_OR_UPDATE">
<active>true</active>
<advanced>false</advanced>
<category>performance</category>
<conditions table="sp_widget">client_scriptLIKE$rootScope.$on^client_scriptNOT LIKE$scope.$on('destroy'^ORclient_scriptNOT LIKE$scope.$on("destroy"^EQ<item endquery="false" field="client_script" goto="false" newquery="false" operator="LIKE" or="false" value="$rootScope.$on"/>
<item endquery="false" field="client_script" goto="false" newquery="false" operator="NOT LIKE" or="false" value="$scope.$on('destroy'"/>
<item endquery="false" field="client_script" goto="false" newquery="false" operator="NOT LIKE" or="true" value="$scope.$on(&quot;destroy&quot;"/>
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
</conditions>
<description>$rootScope.$on listeners will remain in memory if not properly cleaned up. This will create a memory leak if the controller falls out of scope.</description>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>$rootScope.$on listener</name>
<priority>1</priority>
<resolution_details>api.controller = function ($rootScope, $scope) {&#13;
/* widget controller */&#13;
var c = this;&#13;
&#13;
var deregister = $rootScope.$on("someevent", function () {});&#13;
&#13;
$scope.$on("$destroy", function destroyScope() {&#13;
deregister();&#13;
});&#13;
};</resolution_details>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (finding, current) {



})(finding, current);]]></script>
<short_description>Always deregister $rootScope.$on listeners on the scope $destory event</short_description>
<sys_class_name>scan_table_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2021-10-27 20:20:15</sys_created_on>
<sys_id>f0e1a8581b27705088d943fddc4bcbc3</sys_id>
<sys_mod_count>8</sys_mod_count>
<sys_name>$rootScope.$on listener</sys_name>
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
<sys_policy/>
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
<sys_update_name>scan_table_check_f0e1a8581b27705088d943fddc4bcbc3</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2021-10-27 21:53:56</sys_updated_on>
<table>sp_widget</table>
<use_manifest>false</use_manifest>
</scan_table_check>
</record_update>