View Issue Details

IDProjectCategoryView StatusLast Update
0003526Composr alpha bug reports[All Projects] General / Uncategorisedpublic2018-02-06 06:08
ReporterChris GrahamAssigned ToSalman 
SeverityFeature-request 
Status resolvedResolutionfixed 
Summary0003526: $util.srl must be used consistently
DescriptionThe screenshot shows it is not.

$util.srl is important for sites that run both HTTPS and HTTP.
There are practical situations where we have sites like this. For example, legacy iframes that only support HTTP.

If running a reverse proxy, Composr will not know which is running, so we cannot stop the exact same JS being served.

We therefore need to strip the protocol, as your $util.srl function does.
TagsNo tags attached.
Sponsorship open

Activities

Chris Graham

2018-02-02 02:29

administrator  

Screen Shot 2018-02-02 at 02.19.19.png (893,771 bytes)

Chris Graham

2018-02-02 02:34

administrator   ~0005419

I have updated tut_tempcode to better explain the point of:
 - $BASE_URL_NOHTTP
 - $FIND_SCRIPT_NOHTTP
 - $IMG used in conjunction with $util.srl

In all cases it allows provides when running both HTTPS and HTTP together.
In the case of $FIND_SCRIPT_NOHTTP it also provides safety for multi-domain environments.

Chris Graham

2018-02-02 02:36

administrator   ~0005420

Last edited: 2018-02-02 02:37

View 2 revisions

To provide some further context...

Composr uses absolute URLs throughout, to radically simplify things, such as not having to be knowing where you're relative to, the need for portable context-free code, and the need for PHP itself to call up URLs outside any context.

This is fine and dandy in all situations except JS, which has it's various sandboxing limitations.

Salman

2018-02-06 06:08

reporter   ~0005443

Fixed by https://github.com/ocproducts/composr/commit/6808c50844db063cc1a0dda2171c38cbb1eca8f0

Issue History

Date Modified Username Field Change
2018-02-02 02:29 Chris Graham New Issue
2018-02-02 02:29 Chris Graham File Added: Screen Shot 2018-02-02 at 02.19.19.png
2018-02-02 02:29 Chris Graham Status non-assigned => assigned
2018-02-02 02:29 Chris Graham Assigned To => Salman
2018-02-02 02:34 Chris Graham Note Added: 0005419
2018-02-02 02:36 Chris Graham Note Added: 0005420
2018-02-02 02:37 Chris Graham Note Edited: 0005420 View Revisions
2018-02-06 06:08 Salman Note Added: 0005443
2018-02-06 06:08 Salman Status assigned => resolved
2018-02-06 06:08 Salman Resolution open => fixed
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised