Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve MHonArc resource file #1095

Closed
wants to merge 4 commits into from

Conversation

ikedas
Copy link
Member

@ikedas ikedas commented Jan 25, 2021

This is proposal of extensive change for #1091.

  • Use <% ... %> instead of variable tags in MHonArc resource file
  • Rename resource file
  • Incidental measure

Use <% ... %> instead of variable tags in MHonArc resource file

According to history, at the first time MHonArc resource file adopted TT2, the tags <-% ... %-> were used [1]. But it was changed to (-% ... %-) by the reason that "archives were not properly TT2 parsed" [2]. In fact, if current code is modified to use that tags, extracted archive page may contain the lines such as:

<!--X-Derived: #60#45% path_cgi %#45>/viewmod/listname/.../pngVTalOgmofN.png -->

This is not well-formed if it was parsed as XHTML or HTML 4. However it is legitimate comment for HTML5.

Afterward, (xxx% ... %xxx) (xxx is variable text) were introduced to make tags unpredictable so that (maybe) code injection would be prevented [3]. However, strictly logically speaking, this is not a perfect measure. On the other hand, the texts including < and > cannot be injected thanks to MHonArc that escapes input.

Therefore, now we would be better to use secure tags <% ... %> instead of variable tags.

Rename resource file

Currently the file name is mhonarc-ressources.tt2.

The French spelling "ressources" would be better to be avoided.

Furthermore, names consisting of alphanumeric letters and dot(s) only (and optionally hyphen(s)) should be avoided as they may conflict with the domain name: SYSCONFDIR can contain the directories named by domain.

Suggested name is mhonarc_rc.tt2.

Incidental measure

Existing mhonarc-ressources.tt2 will be converted to mhonarc_rc.tt2 during upgrading process.


[1] sympa-community/historic-sympa@e1d3d41, src/etc/mhonarc-ressources (2004-05-06)
[2] sympa-community/historic-sympa@c1e50fa (2004-06-24)
[3] sympa-community/historic-sympa@eb39494 (2004-12-02) and sympa-community/historic-sympa@96197b2 (2004-12-14)

@ldidry
Copy link
Contributor

ldidry commented Jan 25, 2021

Looks good to me.

@ikedas
Copy link
Member Author

ikedas commented Jan 26, 2021

@salaun-urennes1 , if you remember, could you please tell us what was the actual problem -- how "archives were not properly TT2 parsed" --- that needed the change on sympa-community/historic-sympa@c1e50fa ?

@salaun-urennes1
Copy link
Collaborator

Hi Soji,

Sorry, but I did this commit 16 years ago.
Too old to have further details in memory.

@ikedas
Copy link
Member Author

ikedas commented Jan 28, 2021

@salaun-urennes1 ,

Sorry, but I did this commit 16 years ago.
Too old to have further details in memory.

Well, it's true. :-)
If you noticed anything, please let us know.
If no any problem will be found in these some days (in a week or so), I wish to merge this PR.

@ikedas
Copy link
Member Author

ikedas commented Feb 4, 2021

This was once merged to #1094. Close.

@ikedas ikedas closed this Feb 4, 2021
@ikedas ikedas deleted the issue-1091_imp1 branch February 4, 2021 08:58
@ikedas ikedas added this to the 6.2.62 milestone Feb 5, 2021
ikedas added a commit to ikedas/sympa that referenced this pull request Feb 9, 2021
…e file) under sympa-community#1091

  - Update POTFILES for changing name of a file
  - Update xgettext.pl for the new tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants