helpSavannah Administration - Support: sr #110659, .php files with javascript code in...

 
 

sr #110659: .php files with javascript code in bug tracker

Submitter:  Yuchen Pei <ycp>
Submitted:  Tue 17 May 2022 11:27:20 AM UTC
 
Category:  Savannah trackers - bugs, tasks, etc. Priority:  5 - Normal
Severity:  2 - Minor Status:  Need Info
Assigned to:  ineiev Operating System:  GNU/Linux
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

( Jump to the original submission )

Thu 26 May 2022 10:21:34 AM UTC, comment #11: 

> This is not a php script:
>
> https://savannah.nongnu.org/js/show-hide.php:


No, but this is not a file, either, this is a URL.

Plainly speaking, what you quote below is the output of that PHP script (it's even not an object code); people who work on Savane will use the text of the script rather than its output.

Ineiev <ineiev>
Site Administrator
Thu 26 May 2022 10:04:45 AM UTC, comment #10: 

comment #8:

>
> >  One might want to work on savannah, and write a script performing certain actions on all php files assuming they are all php scripts.
>
> These files are PHP scripts.


This is not a php script:

https://savannah.nongnu.org/js/show-hide.php:

document.write('<span class="show-hide" id="linkhide"><span class="minusorplus">(-)</span></span><span class="show-hide" id="linkshow"><span class="minusorplus">(+)</span></span>');
document.getElementById('linkshow').style.display = 'inline';
document.getElementById('linkhide').style.display = 'none';
document.getElementById('linkhide').onclick = function ()
{
  document.getElementById('content').style.display='none';
  document.getElementById('linkhide').style.display='none';
  document.getElementById('linkshow').style.display='inline';
}
document.getElementById('linkshow').onclick = function ()
{
  document.getElementById('content').style.display='inline';
  document.getElementById('linkshow').style.display='none';
  document.getElementById('linkhide').style.display='inline';
}

neither is this:

https://savannah.nongnu.org/js/hide-span.php:

document.getElementById('').style.display='none';

Yuchen Pei <ycp>
Thu 26 May 2022 09:57:48 AM UTC, comment #9: 

> I'm pretty sure computer programs are copyrightable,


Some programs are copyrightable, other programs are not.

> otherwise there wouldn't be a free software movement.


Wrong.  Copyright is just one tool that the bad guys use to make software proprietary.

I feel we are deviating too far from the practical issue.  I don't think we have good chances to solve it.

Ineiev <ineiev>
Site Administrator
Thu 26 May 2022 09:49:09 AM UTC, comment #8: 

>  One might want to work on savannah, and write a script performing certain actions on all php files assuming they are all php scripts.


These files are PHP scripts.

Ineiev <ineiev>
Site Administrator
Thu 26 May 2022 09:36:08 AM UTC, comment #7: 

> I mean that copyright, as the legal system, doesn't apply to them.


I'm pretty sure computer programs are copyrightable, otherwise there wouldn't be a free software movement.

Yuchen Pei <ycp>
Thu 26 May 2022 09:33:56 AM UTC, comment #6: 

> Why is it bad?


Because it confuses humans, including developers, users and sysadmins.  One might want to work on savannah, and write a script performing certain actions on all php files assuming they are all php scripts.  Filenames including extensions have meanings.  Why not name them kittens.jpg and wannacry.exe?

Yuchen Pei <ycp>
Thu 26 May 2022 09:14:11 AM UTC, comment #5: 

> What do you mean that they are not copyrightable?


I mean that copyright, as the legal system, doesn't apply to them.

> It's just plain bad practice to include a .php file in <script>, with only js code in it.


Why is it bad?

Ineiev <ineiev>
Site Administrator
Thu 26 May 2022 08:53:59 AM UTC, comment #4: 

> Yes. most of these scripts (probably all) are clearly uncopyrightable. applying licenses to uncopyrightable works is pointless.


What do you mean that they are not copyrightable?  Are you saying most of these scripts don't have a license?  If so then we have a bigger problem: the GNU project is hosting projects on a nonfree program.

> if the criteria LibreJS uses say that such scripts should be blocked because they have no licenses, then the criteria should be reconsidered.


"No license" means nonfree[1].  LibreJS's purpose is blocking nonfree nontrivial js, so blocking scripts without licensing is working as intended.

https://www.gnu.org/licenses/license-list.html#NoLicense

> and things like extension shouldn't confuse it---after all, they don't confuse the browser, do they?


LibreJS is not confused by the php extension - it blocks it as it is annotated as scripts.  It's just plain bad practice to include a .php file in <script>, with only js code in it.

Yuchen Pei <ycp>
Thu 26 May 2022 07:44:46 AM UTC, comment #3: 

Yes. most of these scripts (probably all) are clearly uncopyrightable. applying licenses to uncopyrightable works is pointless. if the criteria LibreJS uses say that such scripts should be blocked because they have no licenses, then the criteria should be reconsidered.

Ineiev <ineiev>
Site Administrator
Wed 25 May 2022 11:27:05 PM UTC, comment #2: 

> Update of sr #110659 (project administration):
>
>                   Status:             In Progress => Need Info             
>              Open/Closed:                    Open => Closed                


I'm confused - what info is needed?  An answer to your rhetoric question?

Yuchen Pei <ycp>
Tue 17 May 2022 12:22:07 PM UTC, comment #1: 

I thought these files should be "trivial" in terms of LibreJS; and things like extension shouldn't confuse it---after all, they don't confuse the browser, do they?

Ineiev <ineiev>
Site Administrator
Tue 17 May 2022 11:27:20 AM UTC, original submission:  

Savannah appears to be LibreJS-non compliant, with the following funnily named js programs not properly labelled:

https://savannah.nongnu.org/js/show-hide.php
https://savannah.nongnu.org/js/hide-span.php

I guess the first step is to rename them to .js, before making them LibreJS compliant.

---

Example: on <https://savannah.nongnu.org/support/?110615> librejs complains:

blocked scripts in https://savannah.nongnu.org/support/?110615:

https://savannah.nongnu.org/js/show-hide.php:

External script with no known license
https://savannah.nongnu.org/js/hide-span.php:

External script with no known license

Yuchen Pei <ycp>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ineiev (Posted a comment)
  • -email is unavailable- added by ycp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-05-26 ineiev Open/ClosedOpen Closed
    2022-05-26 ineiev Open/ClosedClosed Open
    2022-05-25 ineiev StatusIn Progress Need Info
        Open/ClosedOpen Closed
    2022-05-17 ineiev StatusNone In Progress
        Assigned toNone ineiev

    Back to the top


    Powered by Savane 3.9