-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdeveloper-config.php
More file actions
708 lines (569 loc) · 40.3 KB
/
Copy pathdeveloper-config.php
File metadata and controls
708 lines (569 loc) · 40.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
<?php
/*
* Copyright 2014-2026 GPLv3, Open Crypto Tracker by Mike Kilday: Mike@DragonFrugal.com (leave this copyright / attribution intact in ALL forks / copies!)
*/
///////////////////////////////////////////////////
// **START** DEVELOPER-ONLY CONFIGS
///////////////////////////////////////////////////
// ***************************************************************
// Runs in /app-lib/php/init.php
// ***************************************************************
if ( $dev_only_configs_mode == 'init' ) {
// Application version
// PLEASE ALSO UPDATE TIMESTAMP, TO DATE OF LATEST VERSION BUMP:
$ct['app_version'] = '6.01.09'; // 2026/FEBRUARY/17TH
// #PHP# ERROR LOGGING
// Can take any setting shown here: https://www.php.net/manual/en/function.error-reporting.php
// 0 = off, -1 = on (IF *NOT* SET TO ZERO HERE, THIS #OVERRIDES# PHP ERROR DEBUG SETTINGS IN THE APP'S USER CONFIG SETTINGS)
// WRAP VALUE(S) IN PARENTHESIS, SO MULTIPLE VALUES CAN BE USED: (0) / (-1) / (E_ERROR | E_PARSE)
$ct['dev']['debug_php_errors'] = (0);
// Time offset on daily background tasks (IN MINUTES...MUST BE A NEGATIVE NUMBER)
// (so they run at the same time everyday [without 'creeping' up for it's time-of-day run])
// ONLY AUTO-USED if the 3rd OPTIONAL PARAMETER IN $ct['cache']->update_cache() IS SET AS 'tasks_time_offset'
// Auto-adjusts FURTHER (with a multiplier) for systems with LOW CORE COUNTS in config-init.php
$ct['dev']['tasks_time_offset'] = -2; // DEFAULT = -2, MIN = -3, MAX = -1
// min / max font RESIZE percentages allowed (as decimal representing 100% @ 1.00)
$ct['dev']['min_font_resize'] = 0.5; // 50%
////
$ct['dev']['max_font_resize'] = 2.0; // 200%
// FONT WEIGHT for ALL text in app (as a CSS value)
$ct['dev']['global_font_weight'] = 400; // 400 for ANY font size
// LINE HEIGHT PERCENTAGE for ALL text in app (as a decimal)
$ct['dev']['global_line_height_percent'] = 1.50; // 150% line height for ANY font size
// Cache directories / files and .htaccess / index.php files permissions
// (CHANGE WITH #EXTREME# CARE, to adjust security for your PARTICULAR setup)
// THESE PERMISSIONS ARE !ALREADY! CALLED THROUGH THE octdec() FUNCTION *WITHIN THE APP WHEN USED*
////
// Cache directories permissions
$ct['dev']['chmod_cache_dir'] = '0770'; // (default = '0770' [owner/group read/write/exec])
////
// Cache files permissions
$ct['dev']['chmod_cache_file'] = '0660'; // (default = '0660' [owner/group read/write])
////
// .htaccess / index.php index security files permissions
$ct['dev']['chmod_index_sec'] = '0660'; // (default = '0660' [owner/group read/write])
// !!!!! BE #VERY CAREFUL# LOWERING MAXIMUM EXECUTION TIMES BELOW, #OR YOU MAY CRASH THE RUNNING PROCESSES EARLY,
// OR CAUSE MEMORY LEAKS THAT ALSO CRASH YOUR !ENTIRE SYSTEM!#
// (ALL maximum execution times are automatically 900 seconds [15 minutes] IN DEBUG MODE)
////
// Maximum execution time for interface runtime in seconds (how long it's allowed to run before automatically killing the process)
$ct['dev']['ui_max_exec_time'] = 350; // (default = 350)
////
// Maximum execution time for ajax runtime in seconds (how long it's allowed to run before automatically killing the process)
$ct['dev']['ajax_max_exec_time'] = 1000; // (default = 1000)
////
// Maximum execution time for cron job runtime in seconds (how long it's allowed to run before automatically killing the process)
$ct['dev']['cron_max_exec_time'] = 1320; // (default = 1320)
////
// Maximum execution time for internal API runtime in seconds (how long it's allowed to run before automatically killing the process)
$ct['dev']['int_api_max_exec_time'] = 120; // (default = 120)
////
// Maximum execution time for webhook runtime in seconds (how long it's allowed to run before automatically killing the process)
$ct['dev']['webhook_max_exec_time'] = 120; // (default = 120)
// You can use this array for excluding / including the 'special' (hard-coded) asset EXCHANGE KEYS in any logic
$ct['dev']['special_asset_exchange_keys'] = array(
'misc_assets',
'presale_usd_value',
'btc_nfts',
'eth_nfts',
'sol_nfts',
'alt_nfts',
);
// You can use this array for excluding / including the 'special' (hard-coded) asset TICKERS in any logic
$ct['dev']['special_asset_tickers'] = array(
// 'TICKER',
'MISCASSETS',
'BTCNFTS',
'ETHNFTS',
'SOLNFTS',
'ALTNFTS',
);
// API THROTTLE MAPPING, for servers requiring TRACKED THROTTLE-LIMITING,
// due to limited-allowed second / minute / daily requests
// (are processed by ct_cache->run_api_throttling(), to avoid using up API request limits)
// ANY *DYNAMIC* LOGIC MUST BE ADDED IN /inline/config/dynamic-throttling-config.php
$ct['dev']['throttled_apis'] = array(
// 'tld_domain_name' => 'throttle_array',
// DYNAMIC (set in dynamic-throttling-config.php)
'alphavantage.co' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => null, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://www.ankr.com/docs/rpc-service/service-plans/#rate-limits
// (added 5/sec, PRESUMING some type of throttling under heavier loads)
'ankr.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 50,
'per_second' => 5, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://www.binance.com/en-ZA/support/faq/detail/360004492232
'binance.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 10, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://www.binance.com/en-ZA/support/faq/detail/360004492232
'binance.us' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 10, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://docs.bitfinex.com/docs/requirements-and-limitations
'bitfinex.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 10,
'per_second' => null, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://www.bitstamp.net/api/#section/Response-codes
'bitstamp.net' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 400, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://support.chainstack.com/hc/en-us/articles/6955614349209-Node-and-connection-limitations
// 67 per-minute throttling keeps us within 3mil requests per-month free 'developer' plan limits
'chainstack.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 67,
'per_second' => 25, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://docs.cdp.coinbase.com/exchange/docs/rate-limits
'coinbase.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 10, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://support.coingecko.com/hc/en-us/articles/4538771776153-What-is-the-rate-limit-for-CoinGecko-API-public-plan
// EVEN THOUGH COINGECKO HAS NO PER-SECOND THROTTLE LIMIT,
// SET A PER-SECOND VALUE, AS THEY ARE USUALLY PRETTY STRICT WITH ACCESS LIMITS
'coingecko.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 4, // As they are OFTEN under heavy load, less than spec
'per_second' => 0.4, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://crypto.com/exchange-docs-v1#resp-code
'crypto.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 100, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://docs.etherscan.io/support/rate-limits
'etherscan.io' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 10, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://github.com/gateio/rest-v4
'gateio.ws' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 300, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://apiguide.geckoterminal.com/faq
'geckoterminal.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 30,
'per_second' => null, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://docs.gemini.com/rate-limit
'gemini.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 1, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// FREE tier is one request per second (as of 2025/may/3rd):
// https://dev.jup.ag/docs/api-setup
'jup.ag' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 1, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://support.kraken.com/articles/206548367-what-are-the-api-rate-limits-#1
'kraken.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 1, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// NO DOCS, BUT CAN BE FINICKY, SO MIGHT AS WELL THROTTLE IT
'medium.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 1, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// NO DOCS NOTED, BUT WE PRESUME 3 REQUESTS PER SECOND / 30 PER MINUTE
'publicnode.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 30,
'per_second' => 3, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://www.reddit.com/r/redditdev/comments/14nbw6g/updated_rate_limits_going_into_effect_over_the/
'reddit.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 10,
'per_second' => null, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://solana.com/docs/references/clusters
'solana.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 4, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this
'telegram.org' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => 20,
'per_second' => null, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
// https://help.twilio.com/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues
'twilio.com' => array(
'min_cache_time' => null,
'per_day' => null,
'per_minute' => null,
'per_second' => 1, // 100000 max, 0.25 minimum (below 1 will slow runtime!)
),
);
// PRIMARY Domain only (NO SUBDOMAINS), for each API service that requires multiple calls (for each data set)
// Used to throttle these market calls a tiny bit (0.55 seconds), so we don't get easily blocked / throttled by external APIs etc
// (ANY EXCHANGES LISTED HERE ARE FLAGGED IN THE INTERFACE AS !NOT! RECOMMENDED TO BE USED AS THE PRIMARY CURRENCY MARKET IN THIS APP,
// AS ON OCCASION THEY CAN BE !UNRELIABLE! IF HIT WITH TOO MANY SEPARATE API CALLS FOR MULTIPLE COINS / ASSETS)
// ADDING ANYTHING ALSO DIRECTLY ABOVE THIS SETTING IN $ct['dev']['throttled_apis'] WILL BE AUTO-REMOVED FROM HERE,
// TO AVOID DOUBLE-THROTTLING (IF ADDED ABOVE [FOLLOWING THEIR API SPECS], THEY SHOULD BE SAFE ENOUGH TO *NOT* BE FLAGGED HERE AS 'LIMITED')!!!
// !MUST BE LOWERCASE!
// #DON'T ADD ANY WEIRD TLD HERE LIKE 'xxxxx.co.il'#, AS DETECTING TLD DOMAINS WITH MORE THAN ONE PERIOD IN THEM ISN'T SUPPORTED!!!
// WE DON'T WANT THE REQUIRED EXTRA LOGIC TO PARSE THESE DOUBLE-PERIOD TLDs BOGGING DOWN / CLUTTERING APP CODE, FOR JUST ONE TINY ENHANCEMENT
$ct['dev']['limited_apis'] = array(
'aevo.xyz',
'anchor.fm',
'bitflyer.com',
'bitso.com',
'blockchain.info',
'btcmarkets.net',
'megaphone.fm',
'substack.com',
'stackexchange.com',
'youtube.com',
);
// Exchange APIs that have NO TRADE VOLUME DATA (for UX on trade volume data in interface)
$ct['dev']['no_trade_volume_api_data'] = array(
// 'exchange-config-key-name-here',
'misc_assets',
'presale_usd_value',
'gateio_usdt_futures',
'btc_nfts',
'eth_nfts',
'sol_nfts',
'alt_nfts',
'coinspot',
'unocoin',
);
// Market ID delimiters (for coin exchange market IDs)
// (USED FOR PARSING OUT PAIRING VALUE, WHEN ADDING NEW MARKETS IN ADMIN 'PORTFOLIO ASSETS' INTERFACE)
$ct['dev']['hyphen_delimited_markets'] = array(
'coinbase',
'okex',
'okex_perps',
'kucoin',
'okcoin',
'zebpay',
'aevo',
);
$ct['dev']['reverse_hyphen_delimited_markets'] = array(
'upbit',
'buyucoin',
);
$ct['dev']['underscore_delimited_markets'] = array(
'bitflyer',
'korbit',
'bitso',
'poloniex',
'crypto.com',
'gateio',
'gateio_usdt_futures',
);
$ct['dev']['forwardlash_delimited_markets'] = array(
'btcmarkets',
'jupiter_ag',
);
$ct['dev']['colon_delimited_markets'] = array(
'cex',
);
// Market IDs HAVE PAIRING IN FRONT OF ASSET
$ct['dev']['reverse_id_markets'] = array(
'upbit',
'buyucoin',
);
// Auto-correct for end user market searches, when adding new markets
// NOTE: We don't include jupiter ag, as their tickers are case-sensitive!
$ct['dev']['markets_uppercase_search'] = array(
'alphavantage_stock',
'gateio',
'gateio_usdt_futures',
'binance',
'binance_us',
'bitbns',
'bitflyer',
'btcmarkets',
'btcturk',
'buyucoin',
'cex',
'coinbase',
'coindcx',
'hitbtc',
'kraken',
'luno',
'okcoin',
'okex',
'okex_perps',
'unocoin',
'upbit',
);
$ct['dev']['markets_lowercase_search'] = array(
'bitstamp',
'coingecko',
'gemini',
'huobi',
'wazirx',
'bitso',
'korbit',
'coinspot',
);
// Servers which are known to block API access by location / jurisdiction
// (we alert end-users in error logs, when a corresponding API server connection fails [one-time notice per-runtime])
$ct['dev']['location_blocked_servers'] = array(
// 'tld_domain_name',
'binance.com',
'bybit.com',
);
// FULL RESET(s) on specified category settings (the setting CAN include internal subarrays)
// Resets ENTIRE setting, IF upgrading from EARLIER version than param value
// ONLY top-level AND one-level deep KEY NAMES WITHIN A CATEGORY ARRAY can be reset:
// $ct['conf']['CATEGORY']['setting-key-1']
// $ct['conf']['CATEGORY']['top-level-key']['setting-key-2']
// THIS ALWAYS OVERRIDES 'config_deny_additions' AND 'config_deny_removals'
$ct['dev']['config_allow_resets'] = array(
// setting key id, and app version number of when the reset was added
// NO DUPLICATES, REPLACE KEY'S VALUE WITH LATEST AFFECTED VERSION!
// 'setting-key-1' => '0.90.00',
// 'setting-key-2' => '1.23.45',
// Better low-cpu-count support (auto-multiplied by num of cores in logic)
'light_chart_first_build_hard_limit' => '6.01.07',
);
// MAIN CONFIG settings subarray keys to DENY cached config settings ADDITIONS on (during cached config upgrades)
// (can manipulate later on, based on app version number / user input / etc)
// INCLUDE NUMERIC / AUTO-INDEXING KEYED ARRAYS, EVEN THOUGH WE DON'T SUPPORT THEM WELL *YET*
$ct['dev']['config_deny_additions'] = array(
//////// STANDARD LIST //////////////////////
'strict_news_feed_servers', // Subarray setting (strict news feed servers)
'feeds', // Subarray setting (news feeds)
'anti_proxy_servers', // Subarray setting (anti-proxy servers)
'proxy_list', // Subarray setting (proxy servers)
'tracked_markets', // Subarray setting (asset charts / price alerts)
'plugin_status', // Subarray setting (plugins on / off)
'conversion_currency_symbols', // Subarray setting (currency support)
'bitcoin_preferred_currency_markets', // Subarray setting (currency support)
'crypto_pair', // Subarray setting (currency support)
'crypto_pair_preferred_markets', // Subarray setting (currency support)
'token_presales_usd', // Subarray setting (currency support)
'text_gateways', // Subarray setting (mobile text gateways)
'assets', // Main category (portfolio assets)
);
// MAIN CONFIG settings subarray keys to DENY cached config settings REMOVALS on (during cached config upgrades)
// (can manipulate later on, based on app version number / user input / etc)
// INCLUDE NUMERIC / AUTO-INDEXING KEYED ARRAYS, EVEN THOUGH WE DON'T SUPPORT THEM WELL *YET*
$ct['dev']['config_deny_removals'] = array(
//////// STANDARD LIST //////////////////////
'strict_news_feed_servers', // Subarray setting (strict news feed servers)
'feeds', // Subarray setting (news feeds)
'anti_proxy_servers', // Subarray setting (anti-proxy servers)
'proxy_list', // Subarray setting (proxy servers)
'tracked_markets', // Subarray setting (asset charts / price alerts)
'plugin_status', // Subarray setting (plugins on / off)
'conversion_currency_symbols', // Subarray setting (currency support)
'bitcoin_preferred_currency_markets', // Subarray setting (currency support)
'crypto_pair', // Subarray setting (currency support)
'crypto_pair_preferred_markets', // Subarray setting (currency support)
'token_presales_usd', // Subarray setting (currency support)
'text_gateways', // Subarray setting (mobile text gateways)
'assets', // Main category (portfolio assets)
);
// Input keys to EXCLUDE SCANNING for malware injection attacks, IF THEY CAN CAUSE FALSE POSITIVES
// (SHOULD STILL BE HARD-CODE-SANITIZED WITH HTML SPECIAL CHARACTER FILTERS,
// UNLESS IT'S A USER'S WALLET CRYPTO ADDRESS [AS WE DON'T WANT IT MALFORMED] / OR IN A FORM FIELD OUTPUT)
// WE ALREADY AUTOMATICALLY SKIP DATA KEYS CONTAINING 'nonce' / 'crypto_address' IN THE NAME (CASE-INSENSITIVE)
$ct['dev']['skip_injection_scanner'] = array(
// GET / POST key
// Add markets searches MAY contain crypto addresses
'add_markets_search',
// Market IDs containing crypto addresses
// (when adding new markets, via interface)
'jupiter_ag',
'coingecko_terminal',
// Inputs that could cause a false
// positive, during the input malware scanner
// KEYS CONTAINING
// '_key' / '_token' / '_login'
// 'password' / 'nonce' / 'crypto_address'
// ARE ALREADY SKIPPED!
'twilio_sid',
'notifyme_access_code',
);
// ADMIN input keys to EXCLUDE FROM htmlspecialchars() SANITIZATION ENCODING
// (THAT ARE NOT ALREADY IN 'skip_injection_scanner' ABOVE)
$ct['dev']['skip_sanitizing_other'] = array(
// GET / POST keys that are passwords / tokens
// 'keyname',
);
// Attack signatures, used when scanning for script / HTML injection attacks
// (via malware_scan_string() [which is called in malware_scan_requests()] in early-security-logic.php, when scanning all POST / GET data submissions)
// (NOT CASE SENSITIVE, JUST GET THE SIGNATURES RIGHT)
$ct['dev']['script_injection_checks'] = array(
// ENCODE / DECODE signatures
"base64", // base64 PHP
"bin2hex", // hex PHP
"hex2bin", // hex PHP
"btoa", // base64 javascript
"atob", // base64 javascript
// SQL
"char(",
// HTML
"href",
"src",
// CSS
"style",
"@import",
// Javascript
"appendchild",
"javascript",
"script",
"onanim",
"onabort",
"onblur",
"onclick",
"onchange",
"ondblclick",
"ondragdrop",
"onerror",
"onfocus",
"onkey",
"onload",
"onmouse",
"onmove",
"onpoint",
"onresize",
"onreset",
"onselect",
"onsubmit",
"ontoggle",
"onunload",
"onwheel",
);
// Default charset used
$ct['dev']['charset_default'] = 'UTF-8';
////
// Unicode charset used (if needed)
// UCS-2 is outdated as it only covers 65536 characters of Unicode
// UTF-16BE / UTF-16LE / UTF-16 / UCS-2BE can represent ALL Unicode characters
$ct['dev']['charset_unicode'] = 'UTF-16';
// CAPTCHA text settings...
// Text size
$ct['dev']['captcha_text_size'] = 50; // Text size (default = 50)
////
// Number of characters
$ct['dev']['captcha_chars_length'] = 7; // Number of characters in captcha image (default = 7)
////
// Configuration for advanced CAPTCHA image settings on all admin login / reset pages
$ct['dev']['captcha_image_width'] = 525; // Image width (default = 525)
////
$ct['dev']['captcha_image_height'] = 135; // Image height (default = 135)
////
$ct['dev']['captcha_text_margin'] = 10; // MINIMUM margin of text from edge of image (approximate / average) (default = 10)
////
// Only allow the MOST READABLE characters for use in captcha image
// (DON'T SET TOO LOW, OR BOTS CAN GUESS THE CAPTCHA CODE EASIER)
$ct['dev']['captcha_permitted_chars'] = 'ABCDEFHJKMNPRSTUVWXYZ23456789'; // (default = 'ABCDEFHJKMNPRSTUVWXYZ23456789')
// info icon size CSS configs
$ct['dev']['info_icon_size_css_selector'] = "img.tooltip_style_control";
// ajax loading size CSS configs
$ct['dev']['ajax_loading_size_css_selector'] = "img.ajax_loader_image";
// password eye icon size CSS configs
$ct['dev']['password_eye_size_css_selector'] = "i.gg-eye, i.gg-eye-alt";
// standard font size CSS configs
$ct['dev']['font_size_css_selector'] = "#sidebar_menu, #header_size_warning, #alert_bell_area, #background_loading, radio, .full_width_wrapper:not(.custom-select), .iframe_wrapper:not(.custom-select), .footer_content, .footer_banner, .countdown_notice, .sidebar-slogan, .pw_prompt";
// medium font size CSS configs
$ct['dev']['medium_font_size_css_selector'] = ".unused_for_appending";
// small font size CSS configs
$ct['dev']['small_font_size_css_selector'] = ".unused_for_appending, .gain, .loss, .crypto_worth, .extra_data";
// tiny font size CSS configs
$ct['dev']['tiny_font_size_css_selector'] = ".accordion-button";
// These selector(s) are wonky for some reason in LINUX PHPDESKTOP (but work fine in all modern browsers)
// (dynamically appended conditionally in primary-init.php)
$ct['dev']['small_font_size_css_selector_adjusted'] = ", #admin_conf_quick_links a:link, #admin_conf_quick_links legend, td.data";
////
$ct['dev']['tiny_font_size_css_selector_adjusted'] = ", .crypto_worth";
// PERCENT of MEDIUM font size (as a decimal)
$ct['dev']['medium_font_size_css_percent'] = 0.90; // 90% of $set_font_size
////
// PERCENT of SMALL font size (as a decimal)
$ct['dev']['small_font_size_css_percent'] = 0.75; // 75% of $set_font_size
////
// PERCENT of TINY font size (as a decimal)
$ct['dev']['tiny_font_size_css_percent'] = 0.60; // 60% of $set_font_size
}
// ***************************************************************
// ***************************************************************
// ***************************************************************
// Runs in /app-lib/php/inline/config/after-load-config.php (because user config values are used)
// ***************************************************************
elseif ( $dev_only_configs_mode == 'after-load-config' ) {
// MAKE SURE **ANYTHING** RUN IN HERE --IS ENGINEERED TO-- BE CLEANLY RELOADED!!
// Obfuscate these matches in ALL error / debugging logs
// (ONLY ADD SENSITIVE VALUES HERE THAT COULD SHOW IN URL GET REQUEST DATA / ERROR NOTICES / ETC)
$ct['dev']['data_obfuscating'] = array(
// 'hide_this',
$ct['conf']['comms']['smtp_server'],
$ct['conf']['comms']['from_email'],
$ct['conf']['comms']['to_email'],
$ct['conf']['ext_apis']['telegram_your_username'],
$ct['conf']['ext_apis']['telegram_bot_username'],
$ct['conf']['ext_apis']['telegram_bot_token'],
$ct['conf']['ext_apis']['twilio_number'],
$ct['conf']['ext_apis']['twilio_sid'],
$ct['conf']['ext_apis']['twilio_token'],
$ct['conf']['ext_apis']['textbelt_api_key'],
$ct['conf']['ext_apis']['textlocal_api_key'],
$ct['conf']['ext_apis']['google_fonts_api_key'],
$ct['conf']['ext_apis']['etherscan_api_key'],
$ct['conf']['ext_apis']['alphavantage_api_key'],
$ct['conf']['ext_apis']['bitcoin_rpc_server'],
$ct['conf']['ext_apis']['solana_rpc_server'],
);
}
// ***************************************************************
// ***************************************************************
///////////////////////////////////////////////////
// **END** DEVELOPER-ONLY CONFIGS
///////////////////////////////////////////////////
// DON'T CREATE ANY WHITESPACE AFTER CLOSING PHP TAG, A WE ARE STILL IN INIT! (NO HEADER ESTABLISHED YET)
?>